[OpenWrt-Devel] [PATCH] Add /etc/shadow to list of essential files to keep in sysupgrade (bug 18206)

Hannu Nyman hannu.nyman at iki.fi
Sat Oct 25 07:56:12 EDT 2014

Based on bug #18206 sysupgrade can lead to loss of password information in 
certain situations. Most likely all users who will upgrade from versions 
r43017-43040, will lose their current passwords. :-(

Currently /etc/shadow is defined as a conffile in base-files:
​ https://dev.openwrt.org/browser/trunk/package/base-files/Makefile#L37

But it is not defined in the default list of essential files to keep in 

If exporting conffiles info fails, /etc/shadow can get lost.

Shadow passwords are now the default, so saying that preserving /etc/passwd 
is essential while /etc/shadow is not, makes no sense.

The attached patch adds /etc/shadow to the list of essential files.

The patch should probably be also applied to BB14.07.

Signed-off-by: Hannu Nyman <hannu.nyman at iki.fi>

-------------- next part --------------
Index: package/base-files/files/lib/upgrade/keep.d/base-files-essential
--- package/base-files/files/lib/upgrade/keep.d/base-files-essential	(revision 43057)
+++ package/base-files/files/lib/upgrade/keep.d/base-files-essential	(working copy)
@@ -4,6 +4,7 @@
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list