Linux command Useradd,userdel,passwd,groupadd,groupdel,su,usermod
Linux Cloud Genesis Tags: Linux useradd userdel passwd groupadd Groupdel usermod Released: September 16, 2016
Useradd command
Command function
The Useradd command is used for new system users created in Linux.
Command syntax
Useradd (option) (parameter)
Option description
A c〈 Note: Add the note text (Tengyun technology ty300.com). Note text is saved in the comment field of passwd;
A d〈 Login directory: Specify the starting amount of the user login;
One d: Change the preset value;
A e〈 validity period: The expiry date of the specified account;
F〈 buffer days: Specifies the number of days after the password expires to close the account;
A g〈 group: Specifies the group to which the user belongs;
A g〈 group: Specifies the additional group to which the user belongs;
One m: automatically establish the user's login directory;
One m: do not automatically establish the user's login directory;
One n: Cancel the establishment of a group named after the user name;
One r: Set up the system account;
A s<shell>: Specifies the shell used by the user after the login.
One u<uid>: Specifies the user ID.
Parameter description
User name: The user name to create
Userdel command
Command function
The Userdel command is used to delete a given user, as well as files related to the user.
Command syntax
Userdel (option) (parameter)
Option description
One f: Force the deletion of the user, even if the user is currently logged in;
One r: Delete the user at the same time, delete all the files related to the user.
Parameter description
User name: The user name to delete.
passwd command
Command function
The passwd command sets the user's authentication information, including the user's password, password expiration time, and so on.
Command syntax
passwd (option) (parameter)
Option description
One d: Remove the password. This parameter can only be used by the System Manager;
One f: enforcement;
K: settings can only be updated after expiration of the password expires;
One |: Lock the password;
One s: Lists information about the password. This parameter can only be used by the System Manager;
One u: Unlock the locked account.
Parameter Description ·
User name: The user name for which you want to set the password.
Groupadd command
Command function
The Groupadd command is used for the creative workgroup, and the new workgroup information is added to the system files.
Command syntax
Groupadd (option) (parameter)
Option description
One g: Specifies the old new workgroup;
One r: Create a system workgroup. The group of system workgroup is older than 500;
One k: Overwrite configuration file "/etc/lo gin.defs";
One o: Allows groups to be added that are not unique to the old group.
Parameter description
Group Name: Specifies the group name of the new workgroup.
Groupdel command
Command function
Groupde "command to delete a given workgroup, the system files to be modified by this command include"/etc/
Group "and"/Etc/gshadow "
Command syntax
Groupdel (parametric)
Parameter description
Group: To delete a workgroup name.
SU command
Command function
The SU command toggles the current user identity to another user.
Command syntax
SU (option) (parameter)
Option description
C〈 instruction) or--command=〈 instruction: After executing the specified instruction, the original
's identity
One f or one fast: Applies to csh and Tsch, so the shell does not have to read the boot file;
One | or one login: changes the working directory while changing the identity, and Home,shell,
User,logname. In addition, the path variable is changed;
A m,-p or--preserve-environment: Do not change the environment when changing identities
Variable
A s〈shell〉 or-_shell 〈she: Specifies the shell to execute;
A help: Display assistance;
The version information is displayed in an edition.
Parameter description
User: Specifies the target user to switch identities to.
Usermod command
Command function
The Usermod command is used to modify the user's basic information.
Command syntax
Usermod (option) (parameter)
Option description
A c〈 Note: Modify the user account notes text;
A d〈 Login directory: Modify the directory when the user logs in;
A e〈 validity period: Modify the validity period of the account;
A f〈 buffer days: Modify the number of days after the password expires to close the account;
A g〈 group: Modify the group to which the user belongs;
A g〈 group: Modify the additional group to which the user belongs;
A l〈 account name to modify the user account name;
One L: Lock the user password, make the password invalid;
A s〈shell〉: Modify the shell used by the user after login;
A u〈uid〉: Modify the user ID;
One u: unlock password.
Parameter description
Login Name: Specifies the user login name for which you want to modify information.
Manuscripts: Diligent Learning qkxue.net
Read the full version of the Linux command useradd,userdel,passwd,groupadd,groupdel,su,usermod
Linux command Useradd,userdel,passwd,groupadd,groupdel,su,usermod