I want to create a script to check whether a user exists. I am using the logic below:
# getent passwd test > /dev/null 2&>1 # echo $? 0 # getent pa
Login to the server. grep "username" /etc/passwd This will display the user details if present.