3 local ppwd
="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/passwd)"
4 local spwd
="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/shadow)"
6 if [ -n "${ppwd#[\!x]}" ] && [ -z "${spwd#[\!x]}" ]; then
7 logger
-t migrate-shadow
"Moving root password hash into shadow database"
8 sed -i -e "s:^root\:[^\:]*\::root\:x\::" /etc
/passwd
9 sed -i -e "s:^root\:[^\:]*\::root\:$ppwd\::" /etc
/shadow
This page took 0.053841 seconds and 5 git commands to generate.