i really hope this works.

This commit is contained in:
2014-12-23 15:09:57 -05:00
parent f9a3310a0a
commit 799434029f
2 changed files with 19 additions and 2 deletions

View File

@@ -213,12 +213,18 @@ EOF
if [ -n "${REGUSR_PASS}" ];
then
${CHROOTCMD} ${i}/ "echo ${REGUSR}:${REGUSR_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
elif [[ "${REGUSR_PASS}" == '{[BLANK]}' ]];
then
continue
else
sed -i -e "s/^${REGUSR}::/${REGUSR}:!:/g" ${i}/etc/shadow
fi
if [ -n "${ROOT_PASS}" ];
then
${CHROOTCMD} ${i}/ "echo ${root}:${ROOT_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
elif [[ "${ROOT_PASS}" == '{[BLANK]}' ]];
then
continue
else
sed -i -e 's/^root::/root:!:/g' ${i}/etc/shadow
fi