Commit bb468065 authored by Cooper, Caleb's avatar Cooper, Caleb
Browse files

Update rse-bash-modules.sh

parent 80d8626b
...@@ -39,8 +39,9 @@ func_rse_make_sudo_account() { ...@@ -39,8 +39,9 @@ func_rse_make_sudo_account() {
while [[ "$(getent passwd ${NEW_UID})" ]]; do while [[ "$(getent passwd ${NEW_UID})" ]]; do
NEW_UID=$((NEW_UID + 1)) NEW_UID=$((NEW_UID + 1))
done done
if ! sudo useradd.orig -u ${NEW_UID} -s /bin/bash -m -G wheel ${NEW_ACCOUNT}; then if [[ ! -e /etc/sudoers.d/${NEW_ACCOUNT} ]]; then
sudo useradd -u ${NEW_UID} -s /bin/bash -m -G wheel ${NEW_ACCOUNT} echo "${NEW_ACCOUNT} ALL=(ALL:ALL) NOPASSWD:ALL" /tmp/${NEW_ACCOUNT}.sudo
sudo mv /tmp/${NEW_ACCOUNT}.sudo /etc/sudoers.d/${NEW_ACCOUNT}
fi fi
fi fi
if ! echo -e "${NEW_PASS}\n${NEW_PASS}" | sudo passwd ${NEW_ACCOUNT}; then if ! echo -e "${NEW_PASS}\n${NEW_PASS}" | sudo passwd ${NEW_ACCOUNT}; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment