diff options
author | Jonas Smedegaard <dr@jones.dk> | 2010-09-17 02:33:01 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2010-09-17 02:33:01 +0200 |
commit | d108cd46d94080ed9a6da8a59ee0546e1f5e8c4b (patch) | |
tree | 0f6e38d803bf51c0ee8944f742d1bba047056349 | |
parent | 2097421a47ff01828792a387d206560bb2fe3d04 (diff) |
Fix check if primary group (not only secondary ones) exists already.
-rwxr-xr-x | localadduser | 3 |
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!" |