fix remove root pw

This commit is contained in:
teldra 2021-03-12 15:05:14 +01:00
parent 832a283197
commit 8458276594
1 changed files with 2 additions and 1 deletions

View File

@ -6,7 +6,8 @@ for i in $(seq 1 "${users[amount]}"); do
if ! cut -d: -f1 /etc/passwd | grep -q -w "${users[name$i]}"; then
useradd -G audio,video,floppy,cdrom,optical,input,users "${users[desc$i]}" -m -s "${users[shell$i]}" -U "${users[name$i]}"
if [[ "${users[sudo$i]}" == "1" ]]; then
usermod -a -G socklog,wheel,lpadmin "${users[name[$i]}"
usermod -a -G socklog,wheel "${users[name[$i]}"
passwd -dl root
fi
if [[ "${users[sudo$i]}" == "1" ]] && [[ ! "${cfg[de]}" == "none" ]]; then
usermod -a -G lpadmin "${users[$i]}"