Ubuntu Add user adduser, and give sudo permission
How do I create a new Ubuntu user?
First open the terminal, enter: sudo adduser username
Adding user "username" ...
Adding new Group "username" (1001) ...
Adding new user "username" (1001) to group "username" ...
Create home directory "/home/username" ...
Copying files from "/etc, Skel" ...
Enter a new UNIX password: (note here, instead of entering your current user's password, enter the password you want to create a new user)
Re-enter the new UNIX password: (You can lose again)
passwd: Password has been successfully updated
Changing the user information for username
Enter the new value, or press ENTER for the default
Full name []: SD4 (Enter the name of the new user)
Number []:
Work Phone []:
Home Phone []:
Other []:
Is this information correct? [y/n] Y
At this point, the new user has been added successfully, at this time we can play ls/home view, if the display username yangming, the side on behalf of the user creation success.
To this, the user adds success. If you want this user to have root privileges, execute the command:
[Email protected]:~# sudo vim/etc/sudoers
Modify the file as follows:
# User Privilege Specification
Root all= (All) all
DB all= (All) all
Save exit, the DB user has root privileges.
How do I delete Ubuntu users?
Ubuntu Delete users are also operating under the terminal, it is important to note that if you want to delete the user is currently logged in, is deleted, you must log off the current user to switch to another user to delete. For example, just now I set up a new user for yangming user, for example I now use User yangming landed on the desktop, at this time if I want to delete yang this user, is deleted. The correct way to do this is, I write off Yang, and then use root to log on to the desktop, and then delete yangming.
Deleting Ubuntu user commands is easier to remember: sudo userdel username, for example I want to delete yangming, then enter: sudo userdel yangming, after deletion succeeds, the system does not have any prompts.
Go: Ubuntu Add user adduser, and give sudo permission