New user group, user, user password, delete user group, user (for CentOS, Ubuntu system)

Source: Internet
Author: User

In production, the habit is as follows:

Useradd, the default is to add a new user to the user group with the same name. For example, Useradd zhouls, after this command is executed, is added to the Zhouls user group with the same name by default.

However, in production, generally do not do so. Usually,useradd-m-G . Otherwise, when it appears, the user is established, but the home directory does not appear oh. Careful!!! ( important words, say three times )

####################in the CentOS system ##########################

In the CentOS system, the root user executes the

First step: Groupadd New user Group

Groupadd Hadoop This is the creation of a Hadoop user group

Step Two: Useradd-m-G created user group New user

Useradd-m-G Hadoop Hadoop This is a new Hadoop user and home directory that is also created and added to the Hadoop group.

Step three: passwd has created a user

passwd Hadoop Hadoop User Password

Changing password for user Hadoop

New Password:

Retype new Password:

###################################

###################ubuntu system in ###########################

Ubuntu system, root user execution, first how to open, see Ubuntu14.04 after installation of some configuration

First step: sudo groupadd new user group

sudo groupadd Spark This is the creation of the Spark user group.

Step two: sudo useradd-m-G created user group New user

sudo useradd-m-G spark Spark This is a new spark user and home directory also created and added to the Spark group.

Step three: sudo passwd user created

passwd Spark Spark User password

Changing password for user spark

New Password:

Retype new Password:

###################################

deleted, here, not much to repeat. corresponding to, for Userdel, can.

Modified, here, also not much to repeat. corresponding to, for Usermod, can.

  

New user group, user, user password, delete user group, user (for CentOS, Ubuntu system)

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.