|
|
@ -27,8 +27,8 @@ fi
|
|
|
|
GRANT_SUDO=${GRANT_SUDO:-YES}
|
|
|
|
GRANT_SUDO=${GRANT_SUDO:-YES}
|
|
|
|
GRANT_SUDO=$(echo "${GRANT_SUDO}" | tr '[:lower:]' '[:upper:]')
|
|
|
|
GRANT_SUDO=$(echo "${GRANT_SUDO}" | tr '[:lower:]' '[:upper:]')
|
|
|
|
|
|
|
|
|
|
|
|
PASSWORD_RESET=${PASSWORD_RESET:-YES}
|
|
|
|
USERNAME_PASSWORD_RESET=${USERNAME_PASSWORD_RESET:-NO}
|
|
|
|
PASSWORD_RESET=$(echo "${PASSWORD_RESET}" | tr '[:lower:]' '[:upper:]')
|
|
|
|
USERNAME_PASSWORD_RESET=$(echo "${USERNAME_PASSWORD_RESET}" | tr '[:lower:]' '[:upper:]')
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${GRANT_SUDO}" == "YES" ] && [ "${USERNAME}" != "root" ]; then
|
|
|
|
if [ "${GRANT_SUDO}" == "YES" ] && [ "${USERNAME}" != "root" ]; then
|
|
|
|
echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/one-context
|
|
|
|
echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/one-context
|
|
|
@ -61,6 +61,6 @@ ${PASSWORD}
|
|
|
|
${PASSWORD}
|
|
|
|
${PASSWORD}
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
elif [ "${PASSWORD_RESET}" = 'YES' ]; then
|
|
|
|
elif [ "${USERNAME_PASSWORD_RESET}" = 'YES' ]; then
|
|
|
|
usermod -p '*' "${USERNAME}"
|
|
|
|
usermod -p '*' "${USERNAME}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|