mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-23 01:13:40 +07:00
addgroup -> adduser fix
This commit is contained in:
parent
7d5246693c
commit
272a33fe2c
8
debian/security-misc.preinst
vendored
8
debian/security-misc.preinst
vendored
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user