diff --git a/common/prepare-vagrant-user.sh b/common/prepare-vagrant-user.sh index ae516e9..f45238a 100755 --- a/common/prepare-vagrant-user.sh +++ b/common/prepare-vagrant-user.sh @@ -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}