about summary refs log tree commit diff stats
path: root/bin/makeuser
diff options
context:
space:
mode:
Diffstat (limited to 'bin/makeuser')
-rwxr-xr-xbin/makeuser5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/makeuser b/bin/makeuser
index 06c2d1e..73b0fd4 100755
--- a/bin/makeuser
+++ b/bin/makeuser
@@ -19,6 +19,11 @@ usage() {
 
 [[ $(id -u) != 0 ]] && error_exit "you must be the superuser to run this script."
 
+USERLIST=$(ls /home)
+if [[ $USERLIST == *$1* ]]; then
+    error_exit "User already exists!"
+fi
+
 case $1 in
   -h | --help)
     usage; exit ;;