Recently bought a server, only a root user, every day login is not convenient, so want to create new users, before the local is the interface session of the new user, this time to record the learning command line to create a new user process:
The first step:
# sudo adduser zhq This ZHQ is your own defined user name
The next class will appear a series of input information, as long as the UNIX password to enter the user's password in the line, and then confirm once;
The back is a return. Then the user is built.
But at this time the user is not sudo, that is, can not use administrator rights; take the second step.
Step Two:
# sudo vim/etc/sudoers
Modify the file section as follows:
# User Privilege Specification
Root all= (All:all) all
ZHQ all= (All:all) All (I've added myself to the root, where ZHQ is my username)
There are also some that write:
Root all= (All) all
Just follow the root and add the line.
Save exit, ZHQ user has root privileges. You can use sudo.
Ubuntu command line Add new user with Administrator privileges