diff options
Diffstat (limited to 'localadduser')
-rwxr-xr-x | localadduser | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/localadduser b/localadduser index 292608b..5c624a6 100755 --- a/localadduser +++ b/localadduser @@ -10,6 +10,11 @@ # TODO: Check for bad arguments # TODO: Implement --help option # TODO: Support overriding options in /etc/local file +# TODO: Check gecos field length +# TODO: Check password strength of autogenerated password (and pick another if needed) +# TODO: Deal with non-ASCII chars (transliterate or silence chfn warnings) +# TODO: quiten output: only emit password line by default +# TODO: support reading from file or stdin # set -e @@ -81,6 +86,10 @@ for chunk in $@; do esac done +if getent passwd "$u" | grep -q .; then + exit1 "User \"$u\" already exists!" +fi + if [ -n "$phone_area" ]; then exit1 "Area code provided without trailing phonenumber!" fi |