summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-09-17 02:33:01 +0200
committerJonas Smedegaard <dr@jones.dk>2010-09-17 02:33:01 +0200
commitd108cd46d94080ed9a6da8a59ee0546e1f5e8c4b (patch)
tree0f6e38d803bf51c0ee8944f742d1bba047056349
parent2097421a47ff01828792a387d206560bb2fe3d04 (diff)
Fix check if primary group (not only secondary ones) exists already.
-rwxr-xr-xlocaladduser3
1 files changed, 3 insertions, 0 deletions
diff --git a/localadduser b/localadduser
index 88f424a..677131c 100755
--- a/localadduser
+++ b/localadduser
@@ -90,6 +90,9 @@ done
if getent passwd "$u" | grep -q .; then
exit1 "User \"$u\" already exists!"
fi
+if getent group "$u" | grep -q .; then
+ exit1 "Group \"$u\" already exists!"
+fi
if [ -n "$phone_area" ]; then
exit1 "Area code provided without trailing phonenumber!"