[openwrt/openwrt] base-file: remove password aging feature form /etc/shadow

LEDE Commits lede-commits at lists.infradead.org
Thu Feb 24 09:10:45 PST 2022


aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e040d31177b1507ccac965adc18f2e968310b5c3

commit e040d31177b1507ccac965adc18f2e968310b5c3
Author: Rucke Teg <rucketeg at protonmail.com>
AuthorDate: Tue Feb 22 22:53:25 2022 +0100

    base-file: remove password aging feature form /etc/shadow
    
    In the default shadow file, as visible in the failsafe mode, the user
    root has value of `0` set in  the 3rd field, the date of last password
    change. This setting means that the password needs to be changed the
    next time the user will log in the system. `dropbear` server is ignoring
    this setting but `openssh-server` tries to enforce it and fails in the
    failsafe mode because the rootfs is R/O.
    
    Disable the password aging feature for user root by setting the 3rd
    filed empty.
    
    Signed-off-by: Rucke Teg <rucketeg at protonmail.com>
---
 package/base-files/files/etc/shadow | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow
index 4b4154f21f..39bdb9c90a 100644
--- a/package/base-files/files/etc/shadow
+++ b/package/base-files/files/etc/shadow
@@ -1,4 +1,4 @@
-root::0:0:99999:7:::
+root:::0:99999:7:::
 daemon:*:0:0:99999:7:::
 ftp:*:0:0:99999:7:::
 network:*:0:0:99999:7:::



More information about the lede-commits mailing list