Linux User and user group management commands

Source: Internet
Author: User
Article Title: Linux User and user group management commands. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Linux is a multi-user multi-task time-sharing operating system. any user who wants to use system resources must first apply for an account from the system administrator and then enter the system as the account. User Accounts can help system administrators track users who use the system and control their access to system resources. They can also help users organize files and provide security protection for users.

1. useradd

The useradd command creates a new user account. Its basic usage is

Useradd Username

Enter the following command

Useradd newuser

Linux operation guide topic documentation confidential internal Disclosure

The system will create a new user newuser whose Home directory is/home/newuser

The parameters of the useradd command are often combined

Useradd username-g group name? G group name-d Home directory name-p Password

-G specifies the Primary Group of the user.

-G: Specifies the secondary group of the user.

-D: Specifies the Home Directory of the user.

-P specifies the password of the user.

Enter the following command

Useradd oracle? G oinstall? G dba? D/home/oracle? P ora123

The system will create an oracle user whose primary group is oinstall and whose secondary group is dba.

The/Home/oracle password is ora123 in the home directory.

2. userdel

The userdel command is used to delete an existing account. Its usage is

Userdel Username

3. groupadd

The groupadd command creates a new user group. Its most basic usage is

Groupadd group name

Enter the following command

Groupadd newgroup

The system will create a new user group newgroup

[1] [2] [3] Next page

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.