1 parent 58c5c91 commit a4c06e5Copy full SHA for a4c06e5
1 file changed
userexists.sh
@@ -0,0 +1,18 @@
1
+#!/bin/bash
2
+##Purpose: Check given user Exits Or Not
3
+##Date: 27th Oct 2016
4
+##Author: Ankam Ravi Kumar
5
+##WebSite: https://arkit.co.in
6
+
7
+##Start
8
+echo "Please Enter User name you want check:\c"
9
+read user
10
+grep $user /etc/passwd > /dev/null
11
+if [ $? -eq 0 ]; then
12
+grep $user /etc/passwd
13
+echo "$user Exists in this Machine"
14
+else
15
+echo "$user does not exists"
16
+fi
17
18
+##END
0 commit comments