[SOLVED]Restoring Configuration of nvram dump fails silently

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
PotterMahoney
DD-WRT Novice


Joined: 23 Mar 2022
Posts: 1

PostPosted: Mon May 16, 2022 18:35    Post subject: [SOLVED]Restoring Configuration of nvram dump fails silently Reply with quote
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)

Moderator edited. keep it civil and clean. Thanks
Sponsor
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2971
Location: Germany

PostPosted: Mon May 16, 2022 19:05    Post subject: Reply with quote
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".

best regards
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Mon May 16, 2022 19:30    Post subject: Reply with quote
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.

Thanks for your understanding.

Please note, its not recommended to restore old backups into considerably newer firmware versions. And speaking of versions, yours is no longer supported and contains various security vulnerabilities that have been fixed in current release only.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)


Last edited by the-joker on Wed May 18, 2022 11:15; edited 2 times in total
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Mon May 16, 2022 19:58    Post subject: Reply with quote
Regarding the warning I mentioned earlier, its already present in all builds for a long time.

See attachment.

That is pretty much self explanatory.
restore helpmenu wrote:
Click the Restore button to overwrite all current configurations with the ones in the configuration file.


All means all including passwords.

What I noticed is that help entry needs rewording a bit to fix the grammar and some minor details.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
MLandi
DD-WRT Guru


Joined: 04 Dec 2007
Posts: 1020

PostPosted: Mon May 16, 2022 21:02    Post subject: Reply with quote
the-joker wrote:
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
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Mon May 16, 2022 21:38    Post subject: Reply with quote
PSCP or WinSCP (SSH enabled), or curl to web server for example HFS, or log PuTTY output or copy paste.
MLandi
DD-WRT Guru


Joined: 04 Dec 2007
Posts: 1020

PostPosted: Mon May 16, 2022 22:09    Post subject: Reply with quote
blkt wrote:
PSCP or WinSCP (SSH enabled), or curl to web server for example HFS, or log PuTTY output or copy paste.


Thank you. Got it (PuTTY), works well.

_________________
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
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6436
Location: UK, London, just across the river..

PostPosted: Tue May 17, 2022 7:29    Post subject: Reply with quote
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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12881
Location: Netherlands

PostPosted: Tue May 17, 2022 12:53    Post subject: Reply with quote
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.

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

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087


Last edited by egc on Tue May 17, 2022 18:55; edited 1 time in total
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6436
Location: UK, London, just across the river..

PostPosted: Tue May 17, 2022 14:41    Post subject: Reply with quote
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 Smile 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
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Tue May 17, 2022 18:53    Post subject: Reply with quote
Just to inform all parties concerned with the messages on backup page pertaining to the restore as I posted earlier on my post above -> https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1262806#1262806

The texts have been updated and bolded the relevant portions both on help text and internal help menu.

All languages except English need to be re-translated to suit.

Relevant commit https://svn.dd-wrt.com/changeset/48896/src/router/kromo/dd-wrt/lang_pack/english.js

See attached screenshots for comparison with my initial post above.

I dont think we can do better here, to clarify the default result of restoring backups.
But any suggestions welcome that dont involve nagging popups.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)


Last edited by the-joker on Tue May 17, 2022 18:57; edited 1 time in total
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12881
Location: Netherlands

PostPosted: Tue May 17, 2022 18:56    Post subject: Reply with quote
Very good addition :thumbsup:
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Tue May 17, 2022 19:28    Post subject: Reply with quote
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.

Thanks in advance to any coming forward...

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum