How to add a System User Account on Linux (CentOS)

CentOSOn both CentOS and Red Hat Linux systems you can easily create new user accounts with their own home directories.

Here’s how you do this from the command line. I’m assuming you’re logged in as root, and the new user we’d like to create is called “testuser”:

Let’s give our testuser a password so s/he can login to the system via SSH:

This will prompt for a new password (twice), followed by the message that “all authentication tokens have been updated”. Which is nice.

You can now login as “testuser” with your designated password. Testuser’s home directory is located here:

That’s all there’s to it – congratulations on creating a new user on your system 😉

Removing a User Account

If you’re done with the account you can remove it with

The data in this user’s home directory will still be intact, even when the user is removed. In case you’d like to do some house cleaning, you can pass -r which will remove the user’s directory and all contents he may have had:

Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at and

Add your voice!