Debian 11 Bullseye
Sponsored Link

Initial Settings : Add User Accounts
2021/08/17
 
If you'd like to add new user accounts, configure like follows.
[1] For example, Add a [bullseye] user.
root@dlp:~#
adduser bullseye

Adding user `bullseye' ...
Adding new group `bullseye' (1001) ...
Adding new user `bullseye' (1001) with group `bullseye' ...
Creating home directory `/home/bullseye' ...
Copying files from `/etc/skel' ...
New password:            # set user password
Retype new password:     # confirm
passwd: password updated successfully
Changing the user information for bullseye
Enter the new value, or press ENTER for the default
        Full Name []:    # input user info (OK with empty all if you do not need)
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n] y
root@dlp:~#
[2] If you'd like to limit users to switch to root user account, configure like follows.
For example, Configure that only [bullseye] user can switch to root account with [su] command.
root@dlp:~#
usermod -G adm bullseye

root@dlp:~#
vi /etc/pam.d/su
# line 15 : uncomment and add the group

auth       required   pam_wheel.so group=adm
[3] If you'd like to remove user accounts, configure like follows.
# remove a user [bullseye] (only removed user account)

ubuntu@dlp:~$
deluser bullseye
# remove a user [bullseye] (removed user account and his home directory)

ubuntu@dlp:~$
deluser bullseye --remove-home
Matched Content