Linux Mint – Revoking access temporarily

How to create virtual machines with VirtualBox

There may come a time where you would like to temporarily revoke a user’s account instead of outright deleting it. Examples of this may be a person who is going on leave, or perhaps you may have a user to whom you no longer wish to grant access, though you still need their files left intact. In Linux Mint, the easiest way to temporarily revoke access to the system is using the Users and Groups tool to change a user’s password to one that they don’t know. Then, they won’t be able to log in until you give them the new password.

Of course, this is not the only way you can temporarily revoke access; you can also do so with the terminal. Also, there are several other ways to do so. One of the easier methods is similar to the preceding example: using the passwd command to change their password. Another way is to execute the following command to lock an account:

sudo passwd -l username

In the preceding example, the -l flag will lock an account. If you would like to unlock an account, use the -u flag instead as shown in the following command line:

sudo passwd -u username

If we are using Linux Mint at home, there may not be many situations where you would need to lock or unlock a user account, but when using Mint in a company, knowing how to quickly modify account access is critical.

Comments are closed.