addgroup -> adduser fix

This commit is contained in:
Patrick Schleizer 2022-08-13 11:35:25 -04:00
parent 7d5246693c
commit 272a33fe2c
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ user_groups_modifications() {
## group 'sudo' membership required to use 'su'
## /usr/share/pam-configs/wheel-security-misc
addgroup root sudo
adduser root sudo
## Useful to create groups in preinst rather than postinst.
## Otherwise if a user saw an error message such as this:
@ -45,7 +45,7 @@ user_groups_modifications() {
## In case a system administrator edits /etc/securetty, there is no need to
## block for this to be still blocked by console lockdown. See also:
## https://www.whonix.org/wiki/Root#Root_Login
addgroup root console
adduser root console
}
output_skip_checks() {
@ -209,11 +209,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."
true "INFO: user '$user_to_be_created' does not exist. Skipping adduser console and pam-auth-update."
return 0
fi
addgroup "$user_to_be_created" console
adduser "$user_to_be_created" console
pam-auth-update --enable console-lockdown-security-misc

View File

@ -27,7 +27,7 @@ if [ ! "$grep_result" = "" ]; then
echo "$0: To unlock, run the following command as superuser:" >&2
echo "$0: (If you still have a sudo/root shell somewhere.)" >&2
echo "" >&2
echo "addgroup $PAM_USER console" >&2
echo "adduser $PAM_USER console" >&2
echo "" >&2
echo "$0: However, possibly unlock procedure is required." >&2
echo "$0: First boot into recovery mode at grub boot menu and then run above command." >&2