Linux users and group configuration files

Source: Internet
Author: User
Linux users and Group configuration files: /etc/passwd/etc/shadow/etc/group/etc/gshadow/etc/login. defs/etc/default/useradd... linux users and Group configuration files: /etc/passwd/etc/shadow/etc/group/etc/gshadow/etc/login. defs/etc/default/useradd the following configuration file/etc/passwd: set and store user information. the file format is as follows: user name: Password: UID: GID: User description: user main directory: logon shell version example: root: x: 0: 0: root:/bi N/bash mqm: x: 495: 501:/var/mqm:/bin/bash mysql: x: 494: 489: MySQL server:/var/lib/mysql: /bin/bash/etc/shadow: Automatically generated by the pwconv command according to/etc/passwd. it can be simply understood as the encrypted version of/etc/passwd. the file format is as follows: login name: encryption password: last Modification time: Minimum Interval: maximum interval: Warning Time: inactive time: Expiration Time: Example: root: $1 $ UNwzoVBB $ 9hMVimoum963DcADQ/QPz1: 15758: 0: 99999: 7: mysql :!!: 15783 ::::: mqm: $1 $17zCEo50 $. DFU6Gm6wZ/i5LcHpfGt90: 15761 ::::::/etc/group: set and store Group information. the file format is as follows: group name: Group password: GID: user example of the group: root: x: 0: root, mqm bin: x: 1: root, bin, daemon mqm: x: 501: mqm, jww/etc/gshadow: the pwconv command is automatically generated by/etc/group. it can be simply understood as the encrypted version of/etc/passwd. the file format is as follows: group name: group password: group administrator name: member Name: root, mqm bin: root, bin, daemon mysql :! :/Etc/login. defs: defines the default settings for new users or groups when creating Users and Groups. for example, whether the user's main directory is required, the password length constraint, and the value range of UID and GID, for the same configuration options, the configuration priority of/etc/shadow is higher than that of/etc/login. defs // Configure user mail # * REQUIRED * # Directory where mailboxes reside, _ or _ name of file, relative to the # home directory. if you _ do _ define both, MAIL_DIR takes precedence. # QMAIL_DIR is for Qmail ## QMAIL_DIR MaildirMAIL_DIR/var/spool/mail # MAIL_FILE. mail // Set the Password's validity period # Password aging co Ntrols: # PASS_MAX_DAYS Maximum number of days a password may be used. # PASS_MIN_DAYS Minimum number of days allowed between password changes. # PASS_MIN_LEN Minimum acceptable password length. # PASS_WARN_AGE Number of days warning given before a password expires. # PASS_MAX_DAYS 99999PASS_MIN_DAYS 0PASS_MIN_LEN 5PASS_WARN_AGE 7 // the value range of uid when a user is added using the useradd command # Min/max values for automatic uid selection In useradd # UID_MIN 500UID_MAX 60000 // when you use the groupadd command to add a user, gid value range # Min/max values for automatic gid selection in groupadd # GID_MIN 500GID_MAX 60000 // whether to execute the USERDEL_CMD command # If defined, this command is run when removing a user. # It shoshould remove any at/cron/print jobs etc. owned by # the user to be removed (passed as the first argument ). # USERDEL_CMD/usr/sbin/userdel_local // whether the default value is Create a user's home directory for the user // it can be overwritten by the-m parameter of the useradd command # If useradd shocould create home directories for users by default # On RH systems, we do. this option is overridden with the-m flag on # useradd command line. # CREATE_HOME yes // Default user permission mask # The permission mask is initialized to this value. if not specified, # the permission mask will be initialized to 022. UMASK 077 // whether to delete an empty group when executing the userdel command # This enables userdel to remove user Groups if no members exist. # USERGROUPS_ENAB yes // password encryption method # Use SHA512 to encrypt password. ENCRYPT_METHOD MD5MD5_CRYPT_ENAB yes/etc/default/useradd: set the default rules for the added users, for example, defining the default user's HOME directory, shell, environment file directory, mail buffer, etc. # useradd defaults file # indicates that you can create a common GROUP = 100 # indicates that the user's home directory path HOME =/home # whether to enable account expiration and suspension, -1 indicates that INACTIVE is not enabled =-1 # The end date of the account. If this parameter is not set, INACTIVE is not enabled. EXPIRE = # SHELL =/bin/bash # the default file source in the user's home directory is SKEL =/etc/skel # whether to create the user mail buffer CREATE_MAIL_SPOOL = yes

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.