Linux Add user information, modify user information

Source: Internet
Author: User

Linux operating system create user can set user information, set the specified Uid,gid, user notes information, specify login shell, specify home directory, can set up and modify a lot of content.

such as the following actions


useradd [Options] Username


Useradd-u username Specify UID to establish user

Useradd-u 1111 Tom

USERADD-G username specify GID to establish user

Useradd-g 1111 Jim

USERADD-C username Specify annotation information to establish a user

Useradd-c "My name is Hello" Hello

useradd-d username Specify the home directory to establish the user

useradd-d/hh hh

Useradd-s username Specify shell to establish user

Useradd-s/sbin/nologin H1

Useradd-g GID username Specifies an additional group that must have an existing GID

Useradd-g 1111 H2

Useradd-r Creating a System User

Useradd-r H3

Useradd-m do not create home directories for users

Useradd-m h4

Useradd-m must create a home directory for the user


Modify the user's specified information, also can be modified

usermod [Options] Username

[Options] is an optional option that specifies the user's information

Usermod-u UID Username Modify UID

Usermod-u 1100 Q1

Usermod-g GID username Modify gid

Usermod-g 1111 Q2

Usermod-g GID Username Modify additional groups add user names to the group where the group ID is located

USERMOD-G 1111 Q3

Usermod-c "INFO" username Modify note information

Usermod-c "This is Q4" Q4

Usermod-s/bin/shells username Modify user Default shell

Usermod-s/sbin/nologin/q5

Usermod-l newname Username Modify user Name


This article is from the "12336320" blog, please be sure to keep this source http://12346320.blog.51cto.com/12336320/1912175

Linux Add user information, modify user information

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.