busybox/base-files forged packages

This commit is contained in:
Conor Horan-Kates
2016-11-18 15:49:40 -08:00
parent 72a27eb586
commit 38465f7280
494 changed files with 12080 additions and 2 deletions

View File

@ -0,0 +1,12 @@
#!/bin/sh
local ppwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/passwd)"
local spwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/shadow)"
if [ -n "${ppwd#[\!x]}" ] && [ -z "${spwd#[\!x]}" ]; then
logger -t migrate-shadow "Moving root password hash into shadow database"
sed -i -e "s:^root\:[^\:]*\::root\:x\::" /etc/passwd
sed -i -e "s:^root\:[^\:]*\::root\:$ppwd\::" /etc/shadow
fi
exit 0