debian: preinst: cleanup user creation
Generate user-groups via -U instead of explicit via groupadd. This also fix the problem that the tinyproxy group were not gererated as "system"-group. Also suppress unneeded output of the existence test.
This commit is contained in:
parent
166ec3323f
commit
97dd21bcff
10
debian/qubes-core-agent.preinst
vendored
10
debian/qubes-core-agent.preinst
vendored
@ -49,13 +49,11 @@ if [ "$1" = "install" ] ; then
|
|||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
# User add / modifications
|
# User add / modifications
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
id -u 'user' || {
|
id -u 'user' >/dev/null 2>&1 || {
|
||||||
groupadd -f user
|
useradd -U -G dialout,cdrom,floppy,sudo,audio,dip,video,plugdev -m -s /bin/bash user
|
||||||
useradd -g user -G dialout,cdrom,floppy,sudo,audio,dip,video,plugdev -m -s /bin/bash user
|
|
||||||
}
|
}
|
||||||
id -u 'tinyproxy' || {
|
id -u 'tinyproxy' >/dev/null 2>&1 || {
|
||||||
groupadd -f tinyproxy
|
useradd -U -r -M --home /run/tinyproxy --shell /bin/false tinyproxy
|
||||||
useradd -g tinyproxy -r -M --home /run/tinyproxy --shell /bin/false tinyproxy
|
|
||||||
}
|
}
|
||||||
usermod -p '' root
|
usermod -p '' root
|
||||||
usermod -L user
|
usermod -L user
|
||||||
|
Loading…
Reference in New Issue
Block a user