diff options
author | ahriman <ahriman@falte.red> | 2019-03-26 20:22:44 +0000 |
---|---|---|
committer | ahriman <ahriman@falte.red> | 2019-03-26 20:22:44 +0000 |
commit | 320fe56137603b7a09c6ba362498a496109d162c (patch) | |
tree | c89b309ad9744872c1e7770e238c418788f2cc5b | |
parent | 0fe7b681310b1afa66e4a08964181b00ec817415 (diff) | |
download | admin-320fe56137603b7a09c6ba362498a496109d162c.tar.gz |
check /etc/passwd for unavailable names
-rwxr-xr-x | bin/makeuser | 2 |
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 |