The parameters and usage of useradd and usermod are explained in detail below!Speaking of the other two, about Linux password-related file storage location description/USR/BIN/PASSWD contains the passwd command./ETC/PASSWD contains user ID, user name, home directory, login shell, and finger informationThe/etc/security/passwd contains encrypted passwords and security information./etc/shdow Password storage location after user's encryptionAll right, bac
The following describes the 60 required Linux commands that must be mastered by new users. If you have mastered these commands, your technology will be greatly improved, we hope that the technology will be greatly improved after reading this article.
Useradd1. RoleThe useradd command is used to create a user account and create a user's starting directory. The permission is a Super User.2. FormatUseradd [-d home] [-s shell] [-c comment] [-m [-k templat
The following content is reproduced from http://www.cppblog.com/prayer/archive/2009/08/13/93234.html
1. RoleThe useradd command is used to create a user account and create a user's initial directory. The permission is the ultimate user.2. FormatUseradd [-D Home] [-s shell] [-C comment] [-M [-k template] [-F inactive] [-e expire] [-P passwd] [-R] Name3. Main Parameters-C: add the remarks text. The remarks text is saved in the remarks column of passwd.-
Command format:useradd [option] User name (option not writable)
Command function:Create a new user
Common options:- u Specifies the user ID, but requires that the UID is not used by another user when specified- d Specify user account host Directory- e Specify user account expiration time, date format: YYYY-MM-DD- g Specifies the user's base group (you can use the GID number to represent the group name)- g Additional groups for the specified user (you can use the GID number to represent the g
Useradd is a very basic command in Linux, but it is not intuitive to use. So that in Ubuntu added a adduser command to simplify the operation of adding users. This article mainly describes some test results when I learn to use the Useradd command.Description: All of the trials in this article were done on Ubuntu14.04.functionThe Useradd command in Linux is used t
Add users under Linux: Useradd user nameAdd password for user name: passwd user NameTo view all users in the system: CAT/ETC/PASSWD |cut-f 1-d:Note: | is a pipe that transmits the cat's output to cut processing; The following cut takes out each line: the first column of the split.With the WHO command, you can see which users are currently logged on, and a user can log in multiple times, such as two root. A root in its local, a rootLog in remotely via
Exercise: Write a script that ends with a task1 , add 5 users, user1,..., user52 , each user's password with the user name, and requirements, add the password after the completion of the passwd command does not display the results of information;3 , each user added after the completion, to show that the user has been successfully added;Useradd user1echo "User1" | passwd--stdin user1 >/dev/nullecho "Add user1 successfully."4, use a variable to save a u
There are a few problems today when practicing the Useradd command to add Linux ordinary users.1, after adding the user, using the usedel command to delete the user and found that the corresponding group was also deleted.Q, does the Userdel Delete command affect only the basic group of user?2, add the user to use the-D/XXX/XXX/USERNAME hint cannot create the directory, but can successfully add the user, and can be changed through the SU command users,
Install VMware
Install Linux
When installing Linux, a user, dragon, and password are created... This user is not a root user and has no root permission.
You can switch dragon to the user root. At this time, you have the root permission. The password is the same as the password of the user created for installation.
Some commands are not allowed for common users.
Common and root usersHttp://blog.sina.com.cn/s/blog_67d873600100kst1.htmlHttp://www.cnblogs.com/xd502djj/archive/2011/11/23/22600
Linux User management command-useradd passwd usermod chage userdel su instance, useraddusermod
User's home directory
Common User:/home/user name. Both the owner and the group belong to this user. The permission is 700.
Super User:/root/the owner and group are both root users with the permission of 550
--------------------------------------------------------------------------------
Useradd [Option] User Name
New and deleted users in Linux can use the command: UseraddLet's first use the man command to understand the use of useradd.
New and delete user actions need to get advanced user Rights FirstInput command: Sudo-iEnter advanced user password after OK
Create a new user Cindy using UseraddInput command: Useradd Cindy
Create a home folder for usersInput command: Test–d/home/cindy
Take a look at the info
, instead of Gid_min-gid_maxuseradd [Options] LOGINUseradd-duseradd-d [Options]DescriptionWhen invoked without the-d option, the Useradd command creates a new user account using the values specified on the comma nd line plus the default values from the system. Depending on command line options, the useradd command would update system files and may also create the new user ' s home di Rectory and copy initia
User management command: Add User useradd, Set User Password passwd, view current user who.
Add User in Linux: useradd User Name
Add password for username: passwd Username
View all users in the system: cat/etc/passwd | cut-f 1-d:
Note: | it is an MTS queue that transmits cat output to cut for processing. The following cut is used to extract the first column of each line separated.
You can use the w
Adding and removing usersUseradd-u Custom Uid-g Custom gid-d Specify home directory-m do not build home directory-S custom shellsuch as: #useradd-u 508-g 500-d/home/user3/-s/bin/nologin user2#tail-2/etc/passwdUser2:x:508:500::/home/user3/:/bin/nologinBy adding a user to a group, the group cannot be deleted, and the group that owns the user needs to be modified before it can be deletedUserdel-r Username Delete a userDelete User's time, do not add-R the
Tags: idid 显示用户与用户组的信息Syntax format: useradd "option" "Username" id [option] [user name]Note: There must be at least one space between each element in the ID command and in the following options and user names
parameter Options
Explanatory notes
-G
Show user groups
-N
Displays the name of the user, group or additional group, and does not display numbers
-R
Show a
Tags: span--ubunt shel Pass command password STR host name1. Add an account:1. Su root, switch to root user2. Useradd [-G Group name] [-s/bin/bash] [-m] User nameIf [-s/bin/bash] is not specified, it will result in the login user's account nameThe shell does not display the [username @ hostname: ~$] format, only displays [$] and cannot log in to the account[-M], specifying that the parameter will create a folder in the/home/directory that is the same
useradd 创建用户Syntax format: useradd "option" "Login" useradd [options] [user name]Note: There must be at least one space between each element in the Useradd command and in the following options and user namesHow to add a user directory using Useradd general workflowWhen using
From: http://www.wangchao.net.cn/bbsdetail_536435.html
Add User GroupAdd a user group using the groupadd commandGroupadd [-g gid] GroupNote:G. Specify the ID of the group.ID of the GID group (it cannot be the same as the existing group ID)Group Name# Groupadd-g 100 sunAdd usersUseradd command to add user groupUseradd [-u uid |-G group] |-D dir |-s shell |-C comment |-M [-K skel_dir] LoginNote:U specified user IDG: Specify the groupD. Specify the user directory.S formulates the User ShellC use
Tags: Error creating user existsReasonexisted before ID name of the same user, with userdel deleted after home directory and mail not deletedWorkaround:1 . Delete previously saved directories and messages[Email protected] ~]# RM-RF Alix[Email protected] ~]# Rm-f/var/spool/mail/alix2. re-create nowUseradd AlixThis article is from the Linux Essentials blog, so be sure to keep this source http://13131277.blog.51cto.com/13121277/1955556The following error occurred while creating the user [[email pro
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.