fixed false positive for extant user in makeuser
This commit is contained in:
parent
2a8fa6d004
commit
0962d66e6c
|
@ -20,7 +20,7 @@ usage() {
|
|||
[[ $(id -u) != 0 ]] && error_exit "you must be the superuser to run this script."
|
||||
|
||||
USERLIST=$(</etc/passwd cut -d ":" -f1)
|
||||
if [[ $USERLIST == *$1* ]]; then
|
||||
if [[ $USERLIST == $1* ]]; then
|
||||
error_exit "User already exists!"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue