I want to check wether user exist in server or not uisng shell script?
can any one help me regarding this
Jump to Post
This script will tell you if a user account exists on the system, just pass the user name you want to check as an argument to the script like
#!/bin/bash cat /etc/passwd | grep ^$1 >/dev/null if [ $? == 0 ]; then echo …
All 5 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.