Centos user management

Source: Internet
Author: User
/Etc/login. both defs/etc/default/useradd are user password configuration files/etc/motdetc/issue logon information: // etc/passwod user information file/etc/shadow user password file extremely logon restrictions... /etc/login. both defs/etc/default/useradd are user password configuration files/etc/motd etc/issue logon information: // etc/passwod user information file/etc/shadow user password file extremely logon restrictions add "*" in front of the password column 『*』『! "Do not use an account to log on to the/etc/group User group Information File/etc/gshadow user group password file UID (user) 0 super user self-added pseudo-User program services related to 1-500 starting from 499 do not need to log on, there can be no home directory 500-65535 common user GID (group) each user has at least one user group (multiple users can exist). each user group includes multiple users in the same group. users in the same group have the same permissions for restructuring./etc/passwod User Information File example: root: x: 0: 0: root:/bin/bash username and password uid gid description information home directory command interpreter/etc/shadow user password file example: root: $1 # nWOaF1QQ $ CPW. a/AYKJHJQDKU7CO: 15551: 0: 99999: 7 ::: it is best to change the password at a time after the user name is encrypted. the minimum time is the maximum time. The maximum number of days indicates the expiration time of the account's idle time./etc/grup User Group Information File example: root: x: 0: root group name password GID group user useradd // add user name-g specify group-d DDH Directory-c description passwd // add user password userdel // delete user finger // query user details groupadd // add user group gpasswd // Set user group password newgrp // switch to the current user group (no group password and the current user is a member of the group, the switch is successful.) usermod // modify the user information. example: // modify usermod-l new username original username // add user to group usermod-G group name username add user to group gpasswd-a username group name delete user gpasswd-d from group username group name 1. add 0xls. add the user to the test management group. in the current directory, change the dir Directory owner to test groupadd test // add the management group useradd-g test 0xls // create the user and add the test group-g. if the group is not specified, passwd oxls is created by default. // create the password id 0xls for the user. // view the user information. chgrp test dir // change the owner of the dir Directory. example 2. attach the 0xls account to the root group gpasswd-a 0xls root or usermod-G root ls 3. delete user 0xls, delete group test userdel 0xls // delete user groupdel test // delete group

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.