In this article our objective is to verify if user account exists in Redhat enterprise Linux machine running with the Operating system version 6.5.


Step 1: Login to server with Username and password.

Step 2: Run following command to find the user details.


$ cat /etc/passwd | grep <username>

Step 3: Following are a few examples to find the user details:

[avula@wikiconsole /]$ cat /etc/passwd | grep avula

avula:x:457057:200:Venkat Avula, abc:/home/isd/venkat:/bin/bash


[avula@wikiconsole /]$ egrep -i “^avula” /etc/passwd

avula:x:457057:200:Venkat Avula, abc:/home/isd/venkat:/bin/bash


[avula@wikiconsole /]$ awk -F’:’ ‘/^avula/{print $1}’ /etc/passwd


Step 4: If you wish to find the group details along with the username, please use following command:

$ id <username>

Step 5: Following is an example to find the group and user details:

[avula@ wikiconsole /]$ id avula

uid=457057(avula) gid=200(isd) groups=200(isd)


You should now have a pretty good idea on How to verify if user exists in Linux / UNIX host.

If you like our article please share and Subscribe to our Facebook page.