about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorahriman <ahriman@falte.red>2019-03-26 20:22:44 +0000
committerahriman <ahriman@falte.red>2019-03-26 20:22:44 +0000
commit320fe56137603b7a09c6ba362498a496109d162c (patch)
treec89b309ad9744872c1e7770e238c418788f2cc5b
parent0fe7b681310b1afa66e4a08964181b00ec817415 (diff)
downloadadmin-320fe56137603b7a09c6ba362498a496109d162c.tar.gz
check /etc/passwd for unavailable names
-rwxr-xr-xbin/makeuser2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/makeuser b/bin/makeuser
index 73b0fd4..e4dc069 100755
--- a/bin/makeuser
+++ b/bin/makeuser
@@ -19,7 +19,7 @@ usage() {
 
 [[ $(id -u) != 0 ]] && error_exit "you must be the superuser to run this script."
 
-USERLIST=$(ls /home)
+USERLIST=$(</etc/passwd cut -d ":" -f1)
 if [[ $USERLIST == *$1* ]]; then
     error_exit "User already exists!"
 fi