fix case when user "user" does not exists

This commit is contained in:
Patrick Schleizer 2020-01-14 09:25:32 -05:00
parent 18c726c3ee
commit 660837dc38
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -165,6 +165,11 @@ legacy() {
user_to_be_created=user
if ! id "$user_to_be_created" &>/dev/null ; then
true "INFO: user '$user_to_be_created' does not exist. Skipping addgroup console and pam-auth-update."
return 0
fi
addgroup "$user_to_be_created" console
pam-auth-update --enable console-lockdown-security-misc