In addition, the instant server provides browser-based WebminUser ManagementFunction, as shown in Figure 8-1.
After logging on to Webmin, select the system main menu, and you will see a user and user group icon at the bottom. Click it to go to the user management function.
Figure 8-1 Webmin page
User Management
1. Add a user
The command for adding a user is useradd. Suppose we add a user named testuser, set its logon Shell, and set its other attributes:
Useradd-s/bin/bash-G thiz-d/home/testuser
Passwd testuser
For more information about useradd, see man useradd. Here, the-s parameter is used to specify the user's startup Shell. If you do not want to authorize the user's Shell, add/dev/null and/usr/bin/passwd to/etc/Shells, specify the Shell as/dev/null or/usr/bin/passwd. In the first case, users are not allowed to log on. For example, if the user is an email account, ONLY emails can be sent and received. In the second case, users are allowed to log in and change their passwords. -G is used to specify that a user belongs to the added testuser user group and also belongs to the thiz user group. -D is used to specify the location of the user's main directory. If this parameter is set to the default location/home/testuser, you can also choose not to specify it. By default,/home/testuser is created and the user's main directory is directed to this directory ). After adding a user, you need to use the passwd command to set a password for the user.
To modify the attributes of added users, run the usermod command or get more information in man usermod.
Use Webmin to enter the user management module of the system information, as shown in Figure 8-2.
Figure 8-2 user management module
To add a user, Click create user.
As shown in Figure 8-3, you can specify these parameters in the first part of the Add User Interface: User Name, real name, user ID, default value) and user home directory), Login Shell and password; the second part is to set the expiration time of the user account, the number of days not to use the number of days is used to indicate the time when the user password expires to the account is completely stopped, 0 indicates that the account is stopped as soon as the password expires.-1 is used to cancel this feature. The default value is-1). The number of days of warning has elapsed since the password was changed by the last user, to the number of days that the system prompts the user to change the password again, this is to regularly ask the user to change the password to enhance system security), the minimum number of days between the two password changes) the maximum number of days between the password change and the maximum number of days. After the period expires, the user will force the user to set a new password upon logon). The third part is used to set the group: the new group adds a group to the user. If this parameter is left blank, a group with the same name as the user is added.) the existing group sets the user group as an existing group) and Sub-Groups). The fourth part is used to set whether to create the user's home directory and whether to copy the user's settings file. To the main directory, and whether to update the attributes of the user in other settings.
Figure 8-3 create a new user
If you do not understand a parameter when setting it, click the text in front of the input box for help.