base-files: make user_add() populate the shadow db as well

SVN-Revision: 32063
This commit is contained in:
Jo-Philipp Wich
2012-06-05 17:40:32 +00:00
parent 9ae901445b
commit a044a43d06
2 changed files with 2 additions and 1 deletions

View File

@@ -302,6 +302,7 @@ user_add() {
[ -f "${IPKG_INSTROOT}/etc/passwd" ] || return 1
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd
echo "${name}:x:${uid}:${gid}:${desc}:${home}:${shell}" >> ${IPKG_INSTROOT}/etc/passwd
echo "${name}:x:0:0:99999:7:::" >> ${IPKG_INSTROOT}/etc/shadow
rc=$?
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd
return $rc