CentOS 7 control system accounts file

Account document control
in addition to the Linux system administrator account and various account we created manually. But these accounts do not have long-term and casual you can use useradd can create user settings, will inevitably result in some security risks, so we have to learn to lock the account profile.

When a user file is not locked, we can always create a new user using the useradd command
CentOS 7 control system accounts file
when we want to limit free to create a user in the system, you can use the chattr command in conjunction with "+ i" option to lock the file.
chattr + i / etc / passwd / etc / shadow
CentOS 7 control system accounts file

When we find a user file locking and then use the useradd command has been unable to create a new user.
CentOS 7 control system accounts file

Can lock solution we will be able, when we need us to re-create a new user, you can use the chattr command in conjunction with "-i" option to unlock the file. When we unlocked again after use can be useradd to create a new user.
CentOS 7 control system accounts file

Guess you like

Origin blog.51cto.com/14449528/2432755
Recommended