Locking user accounts
In SELinux, the concept of locking user accounts is often associated with standard Linux account management practices, such as using the passwd
command. SELinux itself does not directly handle account locking; rather, it relies on Linux’s account management tools to lock and unlock user accounts. Here are some Terminal examples of how to lock and unlock a user account:
- Locking a user account:
To lock a user account, you typically disable the account by changing the account’s password. This can be achieved by using the
passwd
command with the-l
(lock) option:
Figure 12.9 – Locking a user account
- Unlocking a user account:
To unlock a user account that has been locked, you can use the
passwd
command again, with-u
to unlock andf
for the force option:
Figure 12.10 – Unlocking a user account
The first command unlocks the password for the intruder
user, and the...