diff --git a/Userland/Utilities/useradd.cpp b/Userland/Utilities/useradd.cpp index 37f8b60a1a..3b6b50db24 100644 --- a/Userland/Utilities/useradd.cpp +++ b/Userland/Utilities/useradd.cpp @@ -64,6 +64,11 @@ int main(int argc, char** argv) return 1; } + if (getpwnam(username)) { + warnln("user {} already exists!", username); + return 1; + } + if (uid < 0) { warnln("invalid uid {}!", uid); return 3;