Made groups to add user to when not Fedora into a variable with an if statement to add 'netdev' to that list if the OS is Debian, due to elementaryOS not having the 'netdev' group
This commit is contained in:
@@ -97,10 +97,16 @@ else
|
||||
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 \
|
||||
audio,cdrom,dip,floppy,netdev,plugdev,sudo,video,dialout,lpadmin \
|
||||
${groups} \
|
||||
${username}
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user