summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorPeter Denison <openwrt@marshadder.org>2008-09-30 00:56:55 +0000
committerPeter Denison <openwrt@marshadder.org>2008-09-30 00:56:55 +0000
commit5ff6932c66ce9b2b5e05c833d3d886be0b28ee17 (patch)
tree7babb47a3b14334a33a8e70b916c0c345c40a7cd /package/base-files
parent6e44b5c9c1f19ea35d79425d130d98211bcd40e7 (diff)
downloadmtk-20170518-5ff6932c66ce9b2b5e05c833d3d886be0b28ee17.zip
mtk-20170518-5ff6932c66ce9b2b5e05c833d3d886be0b28ee17.tar.gz
mtk-20170518-5ff6932c66ce9b2b5e05c833d3d886be0b28ee17.tar.bz2
Allow dropbear to use shadow passwords, and correct base-files generation of /etc/shadow
SVN-Revision: 12809
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 9f745aa..4f8569e 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -146,7 +146,12 @@ define Package/base-files$(TARGET)/install
$(CP) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/* $(1)/; \
fi \
)
- $(if $(CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS),cp $(1)/etc/passwd $(1)/etc/shadow)
+# Form valid /etc/shadow entries, by copying the user:pw pairs
+# from /etc/passwd, and adding on pw change data
+ $(if $(CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS), \
+ cut -d ':' -f 1-2 $(1)/etc/passwd > $(1)/etc/shadow; \
+ $(SED) 's/$$$$/:13848:0:99999:7:::/' $(1)/etc/shadow \
+ )
$(SED) 's,$$$$R,$(REVISION),g' $(1)/etc/banner
mkdir -p $(1)/dev
mkdir -p $(1)/etc/crontabs