Split off new user creation into seperate script

This commit is contained in:
2025-12-31 23:23:34 -05:00
parent d186c475b0
commit 9a32510698
2 changed files with 53 additions and 36 deletions

View File

@@ -73,42 +73,7 @@ source \
# adduser --no-create-home ${username}
# fi
if [[ "${ID}" == 'fedora' ]]; then
printf \
'\033[?47h\033[2J\033[H'
cat << EOF
Enter a password for the new user account:
EOF
passwd \
${username}
printf \
'\033[?47l'
usermod \
-a \
-G \
audio,cdrom,dip,floppy,wheel,video,dialout \
${username}
else
if [[ -z "$(cat /etc/group | grep 'lpadmin')" ]]; then
groupadd --gid 108 lpadmin
fi
groups='audio,cdrom,dip,floppy,plugdev,sudo,video,dialout,lpadmin'
if [[ "${ID}" == 'debian' ]]; then
groups+=',netdev'
fi
usermod \
-a \
-G \
${groups} \
${username}
fi
"${baseDir}/adduser.sh"
if [[ "${ID}" == 'elementary' ]]; then
"${baseDir}/namarupa.sh"