To demonstrate, I use the newuser
as user name
# adduser newuser
Adding user `newuser' ...
Adding new group `newuser' (1001) ...
Adding new user `newuser' (1001) with group `newuser' ...
Creating home directory `/home/newuser' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for newuser
Enter the new value, or press ENTER for the default
Full Name []: New User
Room Number []: 101
Work Phone []: 123456
Home Phone []: 123456
Other []:
Is the information correct? [Y/n] y
# usermod -aG sudo newuser
# su - newuser
After this command, you should be login with the new account
$ sudo ls -al
[sudo] password for newuser:
If everything is ok, th ls -al
should be executed.
# adduser newuser
# passwd newuser
Changing password for user newuser.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
# usermod -aG wheel newuser
# su - newuser
After this command, you should be login with the new account
$ sudo ls -al
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for newuser:
total 20
drwx------ 2 newuser newuser 4096 Jul 23 04:16 .
drwxr-xr-x. 4 root root 4096 Jul 23 04:16 ..
-rw-r--r-- 1 newuser newuser 18 Dec 6 2016 .bash_logout
-rw-r--r-- 1 newuser newuser 193 Dec 6 2016 .bash_profile
-rw-r--r-- 1 newuser newuser 231 Dec 6 2016 .bashrc
-rw-r--r-- 1 newuser newuser 0 Jul 22 18:20 .cloud-locale-test.skip
If everything is ok, th ls -al
should be executed.