[scripts] update the way root password is removed, new chpasswd doesn't work anymore
This commit is contained in:
parent
1dae75d788
commit
f44ddaded6
@ -68,7 +68,9 @@ layman -d sabayon
|
|||||||
rm -rf /var/lib/layman/sabayon
|
rm -rf /var/lib/layman/sabayon
|
||||||
|
|
||||||
# Reset users' password
|
# Reset users' password
|
||||||
echo "root:" | chpasswd
|
# chpasswd doesn't work anymore
|
||||||
|
root_zeropass="root::$(cat /etc/shadow | grep "root:" | cut -d":" -f3-)"
|
||||||
|
sed -i "s/^root:.*/${root_zeropass}/" /etc/shadow
|
||||||
|
|
||||||
# protect /var/tmp
|
# protect /var/tmp
|
||||||
touch /var/tmp/.keep
|
touch /var/tmp/.keep
|
||||||
|
Loading…
Reference in New Issue
Block a user