We are adding a new user called jimmy. Our new server has already given us a sudo user but some Linux distributions may log you in as root. This command assumes you have logged in as ubuntu, a sudo user.
Set password prompts:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Password is entered twice. Make sure it is strong. The other details can be folled in or skiped.
Changing the user information for username
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Y
ubuntu@vds2:~$ su jimmy
Password:
To run a command as administrator (user "root"), use "sudo
See "man sudo_root" for details.
jimmy@vds2:/home/ubuntu$
The command **su jimmy** sets the user to jimmy. Notice how the prompt changes. From now on we will log in as jimmy and use sudo to run commands as administrator.
In Ubuntu the logging on as root is strongly discouraged. We are creating a new user (jimmy). The user ubuntu is not root so we add sudo before the command, The user jimmy is then given sudo privileges.
From now on, never log in as root. Always use your new user and sudo to carry out any admin procedures.
No comments:
Post a Comment