Ubuntu command--How to modify the current user name and add users to the admin group

Source: Internet
Author: User

for specific information, refer to the official forum information:

Http://wiki.ubuntu.org.cn/UbuntuSkills The user in item tenth is managed.

How Ubuntu modifies the current user name and adds the user to the Admin group--Let it have sudo permissions

One day to the TX configuration Ubuntu System Information, suddenly classmate proposed "can modify my own current user name, I want to change a name." "The first time I heard the reaction was yes, Ubuntu how to repair the current user login user name (refer to the system administrator's user name) it. Only know can increase the user, but do not know how to modify the user name. Later through the search for data obtained by the method has two: first, according to the principle of Ubuntu system new users, but this user does not have super permissions, so the user added users to the Admin group, let it have sudo permissions. Then set the user to disable the original user and enable the new account to reach change administrator privileges. Second, the new super user name after the deletion of the original administrator user name, it is recommended to use the root user to delete.

Below I list the commands for new user change permissions.

Add Users

sudo adduser username (This command will create a folder to the home, and there will be more information input)

Disable/Enable an account

sudo usermod-l user name #锁定用户 (L = lock)

sudo usermod-u user name #解锁 (U = unlock)

Or

sudo passwd-l user name #锁定用户 (l =--login new_login)

sudo passwd-u user name #解锁 (u means uid,new UID for the user account)

Add the user to the Admin group to have sudo permissions

sudo usermod-g admin-a user name

(g means--groups is force use Group as new Primary group.) -A indicates that append is append the user to the supplemental GROUPS)

Delete User (recommended to delete with root)

sudo deluser user name

Modify the current user's password

passwd

Modify User Password

sudo passwd user name

Modify User Profile

sudo chfn userid (CHFN-Change your finger (fingerprint) message, that is, to modify this user's information, changes finger shorthand)

How to switch to a different account (requires the user's password)

SU User name

How to switch to the root account

Sudo-s

The above provides the relevant commands, I believe these applications will achieve their desired purpose. In addition, you can manually add users and change the membership of the user group in the top-left system, systems management, users and groups.

Specific information can refer to the official forum information: Http://wiki.ubuntu.org.cn/UbuntuSkills in the tenth item of user management.

This article is from: I love Research and Development Network (52rd.com)-R & D headquarters
Detailed Source: http://www.52rd.com/Blog/Archive_Thread.asp?SID=29919

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.