Ubuntu 25.04
Sponsored Link

Initial Settings : Add User Accounts2025/04/18

 

After installing Ubuntu System, there is only a user you configured during installation except System Accounts and he is an administrative user.
If you'd like to add more common user accounts on System, Configure like follows.

[1] For example, Add a [plucky] user.
ubuntu@localhost:~$
sudo adduser plucky

[sudo] password for ubuntu:  # input your password
info: Adding user `plucky' ...
info: Selecting UID/GID from range 1000 to 59999 ...
info: Adding new group `plucky' (1001) ...
info: Adding new user `plucky' (1001) with group `plucky (1001)' ...
info: Creating home directory `/home/plucky' ...
info: Copying files from `/etc/skel' ...
New password:           # set user password
Retype new password:    # confirm
passwd: password updated successfully
Changing the user information for plucky
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
info: Adding new user `plucky' to supplemental / extra groups `users' ...
info: Adding user `plucky' to group `users' ...
ubuntu@localhost:~$
[2] If you'd like to give privileges to a new user, Configure like follows.
ubuntu@localhost:~$
sudo
usermod -aG sudo plucky

ubuntu@localhost:~$
su - plucky

Password:
# try to run a command which requires root privilege

plucky@localhost:~$
sudo ls -la /root

[sudo] password for plucky:    
# input self password

total 32
drwx------  4 root root 4096 Apr 18 03:39 .
drwxr-xr-x 20 root root 4096 Apr 17 23:46 ..
-rw-------  1 root root  182 Apr 17 23:52 .bash_history
-rw-r--r--  1 root root 3106 Apr  9 12:06 .bashrc
drwx------  2 root root 4096 Apr 18 03:39 .cache
-rw-r--r--  1 root root  132 Apr  9 12:06 .profile
drwx------  2 root root 4096 Apr 17 23:49 .ssh
-rw-------  1 root root 2374 Apr 17 23:51 .viminfo
[3] If you'd like to remove user accounts, Configure like follows.
# remove a user [plucky] (only removed user account)

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

ubuntu@localhost:~$ sudo
deluser plucky --remove-home
Matched Content