Linux Command User Maintenance

Source: Internet
Author: User

Linux Command User Maintenance

Basic

Add a XXX User:

useradd xxx

Add a XXX user, specify home directory for/home/xxx:

useradd -m -d /home/xxx xxx

Add a XXX user, specify the home directory as/home/xxx, and specify with bash:

useradd -m -d /home/xxx -s /bin/bash xxx

Add a XXX user, specify home directory for/home/xxx, and specify with bash, join YYY and ZZZ Group (the default XXX group is also reserved Teng Yun technology ty300.com):

useradd -m -d /home/xxx -s /bin/bash -G yyy,zzz xxx

The creation of group

groupadd xxx

To view groups with XXX user participation:

id xxx

Add the XXX user to the YYY group and the ZZZ Group:

usermod -G yyy,zzz xxx

Change the default shell of the XXX user to bash:

usermod -s /bin/dash xxx

Delete XXX Users:

userdel xxx

Delete the xxx user, along with the home directory Delete:

userdel -r xxx

The above command requires root privileges in addition to the ID XXX.

Commands to modify a user's password

passwd

Manuscripts: Diligent Learning qkxue.net

Read the full version of the Linux command user maintenance

Linux Command User Maintenance

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.