whois
Feature Description: Find and display user information.
Syntax: whois [account name]
Note: The WHOIS directive will go to find and display user-related information for the specified account, because it is located in the WHOIS database of network Solutions, so the account name must be registered on the above to be found, and the name is not the case difference.
WhoAmI
Function Description: The user name appears first.
Syntax: WhoAmI [--help][--version]
Supplemental Note: Displays the user name of itself, this instruction is equivalent to execute "id-un" instruction.
Parameters
--help online Help.
--version Displays version information.
W.H.O.
Feature Description: Displays the user information currently logged into the system.
Syntax: Who [-himqsw][--help][--version][am i][record file]
Additional note: The implementation of this directive will be informed that there are currently users logged into the system, the individual implementation of the WHO command would list the login account, the terminal used, login time and from where to log in or use which x monitor.
Parameters
-H or--heading displays the header information column for each field.
-I or-u or--idle displays idle time, and if the user has performed any action within the first minute, it will be marked as "." If the user has not had any action for more than 24 hours, the "old" string is marked.
-M The effect of this parameter is the same as specifying the "Am I" string.
-Q or--count only displays the account name and total number of logged-in systems.
-S This parameter ignores non-processing and is only responsible for resolving compatibility issues with other versions of the WHO directive.
-W or-t or--MESG or--message or--writable displays the user's information status bar.
--help online Help.
--version Displays version information.
W
Feature Description: Displays the user information currently logged into the system.
Syntax: w [-fhlsuv][user name]
Additional note: The implementation of this directive will be known to users who are currently logged into the system, as well as the programs they are executing. Execute W separately
The command displays all users, and you can specify the user name to display only information about a user.
Parameters
-F turn on or off to show where users are logged into the system.
-H does not display the header information column for each field.
-L uses a detailed format list, which is a preset value.
-S uses a concise format list, which does not show the CPU time consumed by user login times, terminal stage jobs, and programs.
-U ignores the name of the executing program and the information that the program consumes CPU time.
-V Displays version information.
finger Command
The function of the finger command is to query the user's information, which usually displays the user name, home directory, time of stagnation, logon time, login shell, etc. of a user in the system. If you want to query the user information on the remote computer, you need to follow the user name "@ hostname", the [username @ hostname] format, but to query the network host needs to run the finger daemon.
The general format of the command is:
finger [options] [users] [user @ host]
The meanings of the options in the command are as follows:
-S displays information such as the user's registered name, actual name, terminal name, write status, stall time, logon time, and so on.
-L In addition to the information displayed with the-s option, it also displays information such as the user's home directory, login shell, message status, and the contents of the. Plan,. Project, and. Forward files in the user's home directory.
-P is the same as the-l option except that the. plan file and the. project file are not displayed.
[Example] use the finger command on the local machine.
$ finger XXQ
LOGIN:XXQ Name:
Directory:/home/xxq Shell:/bin/bash
Last login Thu Jan 1 21:43 (CST) on tty1
No Mail.
No Plan.
$ finger
Login Name Tty Idle Login Time Office Office Phone
Root root * 25 09:17
......
/etc/group file contains all groups
All user names exist for/etc/shadow and/etc/passwd systems
To modify the method of the group to which the current user belongs
Usermod or you can modify the/etc/paaawd file directly
vlock (Virtual Console lock)
Function Description: Lock the virtual terminal.
Syntax: Vlock [-ACHV]
Additional Note: Execute Vlock instruction can lock virtual terminal, avoid others to use.
Parameters
-A or--all locks all end-stage jobs, and if you use this parameter in a full-screen terminal, the keyboard
The function of switching terminals is closed.
-C or--current locks the current terminal stage job, which is a preset value.
-H or--help online Help.
-V or--version displays version information.
Usermod
Function Description: Modify user account.
Syntax: Usermod [-lu][-c < remarks >][-d < login directory >][-e < expiration >][-f < buffer days >][-g < group >][-g < group >][-l & lt; account name >][-s][-u [user account]
Additional note: Usermod can be used to modify the user account settings.
Parameters
-c< Notes > Modify the Notes text for the user account.
-D Login Directory > Modify user login directory.
-e< Expiration date > Modify the expiration date of the account.
-f< Buffer days > Modify the number of days after the password expires to close the account.
-g< Group > Modify the group to which the user belongs.
-g< Group > Modify the additional groups to which the user belongs.
-l< Account name > Modify user account name.
-L LOCKS the user password to invalidate the password.
-S modifies the shell used by the user when they log in.
-U modifies the user ID.
-U unlocks the password.
Userdel
Feature Description: Delete the user account.
Syntax: Userdel [-r][user Account]
Additional Note: Userdel can delete the user account and related files. Without parameters, only the user account will be deleted, not the relevant files.
Parameters
-F Delete the user log in directory and all files in the directory.
userconf
Function Description: User account Setup program.
Syntax: userconf [--addgroup < group >][--adduser < user id>< Group >< user name >][--delgroup < group >][--deluser < user Id>][--help]
Supplementary Note: Userconf is actually for the linuxconf symbolic connection, provides the graphical interface operation Way, for the administrator to establish and manages each kind of account. If no parameters are added, the graphical interface is entered.
Parameters
--addgroup< groups > new groups.
--adduser< User id>< Group >< user name > Add user account.
--delgroup< groups > Delete groups.
--deluser< user id> Delete user account.
--help display Help.
Useradd
Function Description: Set up user account.
Syntax: Useradd [-mmnr][-c < remarks >][-d < login directory >][-e < expiration >][-f < buffer days >][-g < group >][-g < group >][-s ][-u [user Account] or useradd-d [-b][-e < expiration >][-f < buffer days >][-g < group >][-g < group >][-s]
Additional note: Useradd can be used to create user accounts. After the account is built, then use passwd to set the password of the account. You can delete an account by using Userdel. The account number created by using the USERADD directive is actually saved in the/etc/passwd text file.
Parameters
-c< Notes > Add notes text. Note text is saved in the remarks field of the passwd.
-d< Login Directory > Specify the start directory for user login.
-D Change the preset value.
-e< Expiration date > The expiry date of the specified account.
-f< buffer days > Specify the number of days after the password expires to close the account.
-g< Group > Specify the group to which the user belongs.
-g< Group > Specify the additional groups to which the user belongs.
-M automatically establishes the user's login directory.
-M do not automatically establish the user's login directory.
-N cancels the creation of a group named after the user name.
-R Establish the system account number.
-s Specifies the shell to use when the user is logged in.
-u specifies the user ID.
View users and user groups under Linux