Change user password and create and delete users in Ubuntu

Source: Internet
Author: User

To change the password, follow these steps:

1. Open the terminal and enter the command: sudo passwd user name

2. Enter the original password, and a new password will be prompted. Press Enter. Enter the new password again.

3. The new password takes effect. Close the terminal.

Such as process

Root @ zwh-virtual-machine :~ # Sudo passwd daxiang

Enter a new UNIX password:

Re-enter the new UNIX password:

Passwd: The password is successfully updated.

Root @ zwh-virtual-machine :~ #


The above method is very simple. Just use the sudo command. Next we will share with you how to create and delete users.

Create a user.

Log on with a root account,
Create a new user:
Run: $ sudo adduser tete
Adding user "tete "...
Adding new group "tete" (1002 )...
Adding new user "tete" (1002) to group "tete "...
Create a home directory "/home/tete "...
COPYING file from "/etc/skel...
Enter a new UNIX password:
Enter a new UNIX password:
Passwd: The password is successfully updated.
Changing the user information for tete
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is this information correct? [Y/n] y

Enter "y" and press enter!


Steps to delete a user:

Syntax: userdel [-r] [name of the user to be deleted]
For example: [root @ localhost ~] Userdel-r tete

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.