Some operations on Linux users

Source: Internet
Author: User

1. User Management

A. User classification

Super User: Admin account root UID is 0

System User: System service generated UID range 1 ~ 999

Normal User: Account created by Administrator himself, UID range 1000 ~ 60000

B. Creating a user

# ID account name Verify that the system exists for this account

# Useradd account name Create account

C. Setting a password

#passwd Account Setup Password

D. Modify account information

#usermod

-L new Account old account change login name

E. Deleting an account

Delete an account #userdel account

-R along with home directory delete

Summarize:

When a normal user is created by default, a folder with the same name is created under/home.

This folder is where the user's home directory is created


Experiment One:

1. Create a new user account named Nvshen and set the password to 1234567

Testing with user Nvshen Telnet to the native system

2. Migrate this user's home directory to the/opt/nvshen directory

Re-login the native system with user Nvshen to confirm the current PWD working directory location

3. Completely delete the user account named Nvshen

Check its ID information to see the prompt results. Check if the home directory is available


Experiment Two: Group management

A. Creating a group

#groupadd Group Name

-G GID specifies GID when creating group

B. Adding a Delete member (user) to a group

#gpasswd

-A: Add specified user as group member

-D: Delete the specified member user from within the group

C. Deleting a group

#groupdel


Some operations on Linux users

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.