Skip to content

Commit

Permalink
Fix username check
Browse files Browse the repository at this point in the history
  • Loading branch information
sileshn committed Oct 22, 2023
1 parent cb76228 commit 0582668
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ select yn in "Yes" "No"; do
echo -e ${red}" Blank username entered. Try again!!!"${txtrst}
echo -en "\033[1A\033[1A\033[2K"
username=""
elif grep -q "$username" /etc/passwd; then
elif grep -q "^$username" /etc/passwd; then
echo -e ${red}"Username already exists. Try again!!!"${txtrst}
echo -en "\033[1A\033[1A\033[2K"
username=""
Expand Down

0 comments on commit 0582668

Please sign in to comment.