Commands for users and groups that are aggregated by Linux commands

Source: Internet
Author: User

  1. useradd: Adding Users

    Format: useradd [options] LOGIN

    Parameters:

    -r: Create a System account

    -U: Specify User ID

    -G: Specifies the group ID to which the user belongs

    -C: Add comment information

    -D: Specify the user's home directory

    -S: Specifies the shell used by the user at login

    -G: Specify additional groups to which the user belongs

    -M: Automatically establish the user's log in directory

    Example:

    650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/67/wKiom1Xitm-hY0o4AANc1m0uNcc007.jpg "/>

    Create user Oracle, the additional group belongs to database and Sql,id number 3000, home directory is/home/database

    650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/63/wKioL1XiuI3TUJwOAAQpU3wnwDc485.jpg "/>

  2. Groupadd: Creating Groups

    Format: groupadd [options] Group

    Parameters:

    -R: Creating a System Group

    -G: Specify the Group ID

3. Userdel/groupdel: Delete user/delete group

Format: Userdel [options] LOGIN

Groupdel Group

Userdel Parameters:

-F: Delete the user home directory and its files

4. Usermod/groupmod: Modify account Properties/modify Group Properties

Format: usermod [options] LOGIN

Parameters:

-C: Modify account comment information

-D: Modify home Directory

-E: Modify the expiration date of the account

-S: Modify account Shell

-F: Change the number of days after password expiration to close the account

-U: Unlock password

-L: Lock user password

-L: Modify the account name (online account is not allowed to modify)

Commands for users and groups that are aggregated by Linux commands

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.