A non-root user is required for executing software. Therefore, you need to create such a user before the installation.
The installation user must be the same as the execution user.
If you want to use a new non-root user, create one and set a password for it by performing the following operations as the root user:
groupadd usergroup useradd -g usergroup-d /home/username -m username
passwd username
For security purposes, run the chage command to set the validity period of a password.
The command is as follows:
chage [-m minimum days] [-M maximum days] [-d last day] [-I inactive] [-E expiration date] [-W warning days] user
Table 1 describes the parameters.
Parameter |
Description |
---|---|
-m |
Minimum number of days between password changes. 0 indicates that you can change your password at any time. |
-M |
Maximum number of days during which a password is valid. -1 will remove checking a password's validity and may cause security risks. You are not advised to set this parameter to -1 unless extremely necessary. |
-d |
Date of the last password change. |
-I |
Number of inactive days after the password expiration before the account is locked. |
-E |
Date on which the account is locked. |
-W |
Number of days of warning before a password change is required. |
-l |
Lists account aging information. |
For example, to make the test user expire on December 31, 2019, run the following command:
chage -E 2019-12-31 test