Linux-user management, linux User List

Source: Internet
Author: User

Linux-user management, linux User List

Add User:

Useradd [options] Jack

-U 1000, specify UID

-G 1000: Specify the GID (basic group). The Group must exist.

-G gid (additional group), the Group must exist.

-C: Specify the annotation information.

-D/home/Jack: Specifies the home Directory

-S/bin/tcsh: Specifies the shell path.

-M-k: create a home directory

-M: No home directory is created.

 

/Etc/shells, specifying the Security shell available for the current system

/Etc/login. defs,

/Etc/skel/, bash environment configuration file

 

Delete A User:

Userdel [options] Jack, delete the user, but do not delete the Home Directory

-R: Delete the home directory at the same time.

 

Id to view the user's account attributes

Id user1

-U, UID

-G, GID, basic group

-G, GID, additional group

-N, name, name

 

Finger Jack, view User Account Information

 

Modify user

Usermod [options] Jack

-U UID

-G GID. The changed basic group must exist.

-G gid. If the-a option is not used, the additional group will be overwritten;

-A, append, append

-D,-m: Specify the new home directory and move the files in the original home directory to the new home directory.

-S, shell

-L, login name, Change User name

-L, lock, lock the user

-U, unlock, unlock user

 

Chsh: change shell, modify the user's shell Information

Chfn: change finger, modify comment information

 

Password Management:

Passwd Jack

-- Stdin, standard input, from keyboard

Echo "RedHat" | passwd -- stdin Jack

-L, lock, lock the user

-U, unlock, unlock user

-D: Delete the user password.

PAM:

 

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.