Linux下如何手动创建新的用户(国外英文资料)
Linux下如何手动创建新的用户
How to create new users manually under Linux
Setting up a new user involves two steps. The first step is to use the useradd command to complete the initialization of a new user; the second step is to set the password for the new user with passwd. For example, we need to add a user to the system called floatboat, with the password "lan2010", and the related operations are:
Useradd, floatboat, -d, /u01/Lanlp
The system does not have any display at this time. Next:
Passwd floatboat < ENTER >
System display:
Changing, password, for, user, floatboat
New UNIX password:
Your input:
Lan2010< enter >
Note that since Linux does not use a password like windows echo (shown as *) - to avoid how many bits you notice when you enter a password - so you can't see the characters you entered.
System display:
Retype new UNIX password:
You re-enter the password, and then enter to confirm, then the system will display:
Passwd:all, authentication, tokens, updated, successfully
You succeeded in correcting your password.
Here, the creation of new users is finished.
Next, let's add some more common sense about adding new users:
The initialization operations done by 1 and useradd have been included in the /home directory to create a home directory named floatboat for the floatboat account. If you do not want to use the default directory, and to his main directory on the /home/goal (on the /home, is a good habit, what no other special requirements), the parameter -d can use the useradd command, as follows:
Useradd -d /home/goal floatboat
2, useradd initialization operation also includes for the user to establish a separate user name with the same group (group floatboat). This is called the user private group mechanism, corresponding to the default group mechanism. For user groups, one is to facilitate management, and two is to specify permissions. Complex, we will explore in depth later. If we want this user to join an existing group, we can use the -g parameter. For