Linux User Management

Source: Internet
Author: User

Excerpt from: http://www.runoob.com/linux/linux-user-manage.html

1. Currently owning user

cat/etc/shadow//Login: Encrypted password: Last modified: Minimum time interval: Maximum time interval: Warning Time: Inactivity time: Expiry time: Flag cat/etc/passwd//User name: password: User id: Group ID: annotative Description: Home directory: Login shellcat/etc/group//Group name: password: Group ID: List of users in the group

2. User, group Add delete

useradd-d/home/nginx-m nginx-g nginx//-d directory Specifies the home directory, and if this directory does not exist, the-m option is used to create the master directory. The-G user group specifies the user group to which the user belongs. Userdel-r Nginx-r, its role is to remove the user's home directory. Groupadd group1//adds a new group group1 to the system, and the group identification number of the new group is added 1 on the basis of the currently existing maximum group identification number. GROUPADD-G 101 group2//Adds a new group group2 to the system, specifying that the group identification number for the new group is 101. Groupdel nginx//Delete Group Nginx

3. Modifications

Usermod-s/bin/ksh-d/home/nginx-g Samba nginx user Nginx login Shell modified to Ksh, the main directory changed to/home/samba, the user group changed to samba.

4. Password

passwd option Username-l  locks the password, which disables the account.  -u password to unlock.  -D make the account no password. "Login without password"  -F forces the user to change the password the next time they log on. passwd//No parameter, modify current user password passwd nginx//modify nginx Password

  

  

  

Linux User Management

Related Article

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.