Clean up user creation.
This commit is contained in:
parent
389d606628
commit
e2bc9748a9
@ -6,7 +6,7 @@
|
||||
# AIF, Calamares, and the Arch Wiki.. Credit where credit is due
|
||||
|
||||
# shellcheck disable=SC2086,SC2046,SC2254,SC2164
|
||||
VER=2.4
|
||||
VER=2.5
|
||||
|
||||
# default values {
|
||||
|
||||
@ -1795,7 +1795,7 @@ install_base()
|
||||
install_user()
|
||||
{
|
||||
local i=0
|
||||
local groups='audio,video,floppy,log,network,rfkill,scanner,storage,optical,power,wheel'
|
||||
local groups='log,rfkill,wheel'
|
||||
[[ -e $MNT/etc/X11/xorg.conf.d/20-nvida.conf && -e $MNT/usr/bin/optirun ]] && groups+=',bumblebee'
|
||||
|
||||
rm -f "$MNT/root/.zlogin" # remove welcome message
|
||||
@ -1815,8 +1815,8 @@ install_user()
|
||||
# check if there's an existing user home for new user (separate /home)
|
||||
[[ -d "$MNT/home/$NEWUSER" ]] && i=1
|
||||
|
||||
chrun "useradd -m -u 1000 -g users -G $groups -s /bin/$NEWSHELL $NEWUSER" 2> "$ERR" 2>&1
|
||||
errshow 1 "chrun 'useradd -m -u 1000 -g users -G $groups -s /bin/$NEWSHELL $NEWUSER'"
|
||||
chrun "useradd -m -g users -G $groups -s /bin/$NEWSHELL $NEWUSER" 2> "$ERR" 2>&1
|
||||
errshow 1 "chrun 'useradd -m -g users -G $groups -s /bin/$NEWSHELL $NEWUSER'"
|
||||
chrun "chpasswd <<< '$NEWUSER:$USER_PASS'" 2> "$ERR" 2>&1
|
||||
errshow 1 "chrun 'chpasswd <<< \"$NEWUSER:$USER_PASS\"'"
|
||||
|
||||
|
Reference in New Issue
Block a user