CentOS Add User

Source: Internet
Author: User
Tags pkill

1. Add Users

AddUser test

2. Change the password

passwd test

3. Delete a user

Userdel Test

or delete it along with the user directory

Userdel-f Test

Note: If the user is still logged in, it will prompt that the user is logged in cannot be deleted. You may need to force the user to exit first.

4. Mandatory exit already logged in user

View currently logged in user

# W

USER TTY from [email protected] IDLE jcpu PCPU
Root pts/0 ***.**.***.** 11:33 0.00s 0.08s 0.00s W
tmp_3254 PS1 ***.**.***.** 11:33 0.00s 0.08s 0.00s ls

Command prototype: pkill-kill-t [TTY]

Pkill-kill-t PS1

Repeat the second step of the delete user command to delete the success.

5. Modify the User directory

First finger username , use the command to view the user's original directory

Finger:command not found

Solve

Rpm-qa |grep Fingeryum Install finger

Enter to id username view user uid

ID username

Modify the user home directory

usermod-d/usr/newfolder-u UID Username

-uYou have to pick uid it up later.username
After the modification is complete, finger username you can check for changes before and after changes.

CentOS Add User

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.