disable password againg for root
This commit is contained in:
parent
2fcf0222f7
commit
78ca2defaa
1 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,12 @@ elif [ ${DISTRIBUTION} = 'centos' -o ${DISTRIBUTION} = 'fedora' ]; then
|
|||
chroot ${ROOTFS} useradd --create-home -s /bin/bash -u 1000 vagrant &>> ${LOG}
|
||||
echo -n 'vagrant:vagrant' | chroot ${ROOTFS} chpasswd
|
||||
sed -i 's/^Defaults\s\+requiretty/# Defaults requiretty/' $ROOTFS/etc/sudoers
|
||||
if [ ${RELEASE} -eq 6 ]; then
|
||||
info 'Disabling password aging for root...'
|
||||
# disable password aging (required on Centos 6)
|
||||
# pretend that password was changed today (won't fail during provisioning)
|
||||
chroot ${ROOTFS} chage -I -1 -m 0 -M 99999 -E -1 -d `date +%Y-%m-%d` root
|
||||
fi
|
||||
else
|
||||
debug 'Creating vagrant user...'
|
||||
chroot ${ROOTFS} useradd --create-home -s /bin/bash vagrant &>> ${LOG}
|
||||
|
|
Loading…
Reference in a new issue