From d108cd46d94080ed9a6da8a59ee0546e1f5e8c4b Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 17 Sep 2010 02:33:01 +0200 Subject: Fix check if primary group (not only secondary ones) exists already. --- localadduser | 3 +++ 1 file changed, 3 insertions(+) (limited to 'localadduser') 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!" -- cgit v1.2.3