Linux User and Group management

Source: Internet
Author: User

Linux User and Group management

Security context:
The process runs as its initiator:
The process's access to the file depends on the permissions of the user initiating the process

系统用户: 为了能够让那些后台进程或服务类进程以非管理员身份运行,通常需要为此创建多个普通用户,这类用户不用登陆系统:

Groupadd command: Adding a group

     Groupadd [Options] group-g gid: Specify GID: Default is gid+1 of previous group:-r: Create System Group: Groupmod Command: Modify group information groupmod [options] Group-g GID: Modify GID:-N new_name: Modify group Name: Groupdel command: Groupdel [options] groupusreadd command: Create user Useradd [opt Ions] login-u,--uid uid: Specify UID:-G,--gid Group: Specifies the base group ID, which must exist beforehand:-G,--groups group1[,group2,... [, GROUPN]]: Indicates the additional group to which the user belongs, separated by commas between multiple organizations:-C,--comment Comment: Indicates annotation information:-D,--home-dir Home_dir: The home directory of the user with the specified path: Pass Copy/etc/skel This directory and rename the implementation: The specified home directory path does not replicate the configuration environment profile for users if it exists beforehand:-S,--shell Shell: Specifies the user default shell, all available shell lists are stored in the/etc/shell file Medium:-R,--system: Create System User:-M,--create-home: Do not create a home directory for users note: Creating a user is a lot of the default configuration files are/etc/login.defs useradd- D: Display default configuration for creating User: useradd-d option: Modify default option Value "" The result of the modification is saved in the/etc/default/useradd file usermod command: Modify user options Usermod [option S] login-u,--uid uid: Modify Uid-g,--gid Group: Modify the basic group to which the user belongs:-G,--groups group1[,group2,... [, GROUPN]]: Modifies the additional group to which the user belongs: The original additional group is overwritten:       -A,--append: Used with-large g to append a new additional group to the user:-C,--comment Comment: Modify annotation information:-D,--home-dir Home_dir: Modify the user's home directory  : User's original files will not be transferred to the new location:-M,--move-home: can only be consumed with the-D option to move the original home directory to the new home directory:-L,--login new_login: Modify user name:-S, --shell Shell: Modify user Default shell-l,--lock: Lock user password: That is, before the user's original password string to add a "! ":-U,--unlock: Unlock user's password: Userdel command: Delete user Userdel [options] login-r: Delete home directory when user is deleted:

Linux user and group management

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.