CentOS is a great example of the professional workspace. It offers easy access to all the features of the RHEL (Red Hat Enterprise Linux). It’s possible to perform almost any action with the user accounts, for example, adding/deleting a user account(s), managing the permissions and others etc.
In today’s tutorial, we’ll start by deleting a demo user on CentOS.
Deleting a user account
At first, I’ll be creating a new user for deletion. This is not necessary to perform in the real life. Instead, you have to focus on the user’s data and permissions before deleting the account.
Let’s add a new user into the system. For this purpose, we need the root privilege.
Now, it’s time to create a new user!
Don’t forget to add a password for the newly created account!
Now, it’s time to delete the user! At first, make sure that the user is out of any group in your system –
Note – Depending on the situation in the real world, the following command should be used very carefully. This command will delete the user’s all files.
Make sure that you also remove the user from the privilege list. Run the following command –
Find out the following line –
Remove the entry of the user –
Voila! The user account is completely gone from your system!