trying to get a script to prompt for username input, search the password file for a username and compare it to the /etc/passwd file to see if it legit or not. Any help here would be appreciated. All i got so far is:
#!/bin/bash
echo "Please enter a user name followed by [enter]";
read fname
grep -l ^$fname /etc/passwd
if [ $fname -eq $f1 ]; then
echo "grep $fname /etc/passwd";
fi
Thank you

Reply With Quote
