Posted: Mon May 16, 2022 18:35 Post subject: [SOLVED]Restoring Configuration of nvram dump fails silently
For all the barriers set up, telling me to buzz off - telling me that I shouldn't tell anything for surely Read The Manual, I come here with a simple message;
If the currently set Router Password does not match that, of the Password within the nvram backup, the process shall fail silently shortly after it sets the Router Name.
Thus it is not only rude, in that it fails silently - but also gives off the illusion of having taken effect.
It also refuses WebUI access, until you power-cycle the router, as if it was not bad-mannered enough.
Preferrably, it would either fail completely - or fail visibly (Error: Backup features Password which does not match the Current Password)
Cheers
source: Netgear R7800, Firmware Version DD-WRT v3.0-r48432 (if it works, don't fix it broken)
Of course it is no problem at all if the backup restores another password.
I have done this dozens of times.
1. reset the router to factory settings
2. set the username and password (user=root , pass=123)
3. restored my nvram backup with another password and had no problems in several years (at least none that I remember off the top of my head.)
Just tested this with build r48886 - conclusion no problems
Also, the router automatically reboots when the restore of the backup is completed.
Either your used build has a small bug or you have other problems than "another password".
Joined: 31 Jul 2021 Posts: 2146 Location: All over YOUR webs
Posted: Mon May 16, 2022 19:30 Post subject:
The password in the backup which is restored takes precedence over any other previously setup. This is how it works and how it is expected to work.
Also Once you restore a backup via interface the router will reboot itself, and until reboot has finished you cant access the interface.
Now... if via CLI, is different.
You could restore the backup via CLI, then run nvram show to show you the contents of the restored values in human readable format. Restoring a backup via CLI does not reboot automatically.
Once you reboot, by issuing the [b[]reboot[/b] command and pressing enter, those settings take place and all values in backup will take precedence over the pre-existing ones, this is how a restore works anywhere, even Windows or Linux, it doesn't care whats in the backup is different or not.
You can also export nvram settings to a text file for future reference in human readable format.
nvram show > /tmp/mybackupname.txt and grab that file to your desktop.
Sorry that it doesn't work as you expected, there is no message or warning that should happen in this case, while I agree that the user experience could be improved, reminding a user that this is what will happen, but never that the passwords dont match.
You can also export nvram settings to a text file for future reference in humam readable format.
nvram show > /tmp/mybackupname.txt and grab that file to your desktop.
Probably a silly question that I should know already but...
How do you pull a file from the CLI to a Windows desktop? My Linux is weak so this is likely something simple. _________________ Netgear R9000
DD-WRT v3.0-r55819 std (04/17/24)
Linux 4.9.337 #722 SMP Wed Apr 17 04:16:49 +07 2024 armv7l
Gateway, AP, DNSMasq, Clock 2000MHz
VAP on wlan1 for internet devices
IPv4 & IPv6 (Prefix Delegation)
Static Leases & DHCP
CloudFlare, no SFE, SmartDNS, no QoS
2.4GHz: Vanilla, Airtime Fairness, NG-Mixed, ACK Timing 3150, WPA2 w/AES & WPA3
5GHz: Vanilla, Airtime Fairness, AC/N Mixed, ACK Timing 3150, WPA2 w/AES & WPA3
2 Netgear AX1800 WiFi Mesh Extenders
Xfinity 1.2Gbps/35Mbps
Joined: 16 Nov 2015 Posts: 6436 Location: UK, London, just across the river..
Posted: Tue May 17, 2022 7:29 Post subject:
as winscp is working ok this is the best and the fastest way..
i generally save those files in jffs or opt partition on the usb and than can move the usb to my PC, if you use win 7 you must update system to be able to read/wright .ext format...otherwise if its ntfs no need, but ntfs is no good with DDWRT in general, only for multimedia is ok... _________________ Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Joined: 18 Mar 2014 Posts: 12881 Location: Netherlands
Posted: Tue May 17, 2022 12:53 Post subject:
I too have no problems restoring settings and yes it restores everything including username and password just like I expect it to do and after restore the router is rebooting.
Although I can see some use not to restore username and password and it might be possible to add a checkbox in the restore menu to do that.
I am not sure if the extra code to do that is worthwhile.
We are heavily size constraint as this still should fit in 4 MB (or even 2 MB ) flash router.
Joined: 16 Nov 2015 Posts: 6436 Location: UK, London, just across the river..
Posted: Tue May 17, 2022 14:41 Post subject:
egc wrote:
I too have no problems restoring settings and yes it restores everything including username and password just like I expect it to do and after restore the router is rebooting.
Although I can see some use not to restore username and password and it is might be possible to add a checkbox in the restore menu to do that I am not sure if the extra code to do that is worthwhile.
We are heavily size constraint as this still should fit in 4 MB (or even 2 MB ) flash router.
I have done some limited research and it seems the salt is stored in the password string (MD5 hash) so it should be simple checking for hhtp_username and http_passwd
on my backups, i always have local ssh turned on, login only with key, so if i mess with pass i can change it via ssh witch is easy... _________________ Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Joined: 31 Jul 2021 Posts: 2146 Location: All over YOUR webs
Posted: Tue May 17, 2022 19:28 Post subject:
Thanks I did notice my attention to detail faltered a bit, too much in my head atm, so Ive added a patch to be merged still to make both the external help text and help page text 100% inline with each other.
TBH, in the helpage text I feel we should document nvram show > totextfile.txt as a human readale config type since it is very helpful especially since bin file, despite 3rd party solutions to read/edit them its really not as simple.
Also how to grab the file from dd-wrt to local disk.
So at this time Im asking for volunteers to help document this.