From a6b7d00a82693dcfc81c8dfb0b5800f3aaac49a2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Apr 2004 15:19:28 +0000 Subject: [PATCH] Fix add group script (don't break when users with specified groupname are mentioned in /etc/groups) --- docs/howto/Group-Mapping.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/howto/Group-Mapping.xml b/docs/howto/Group-Mapping.xml index c2b3682b935..475f7f62898 100644 --- a/docs/howto/Group-Mapping.xml +++ b/docs/howto/Group-Mapping.xml @@ -490,11 +490,11 @@ Domain Guests (S-1-5-21-2547222302-1596225915-2414751004-514) -> domguest # Add the group using normal system groupadd tool. groupadd smbtmpgrp00 -thegid=`cat /etc/group | grep smbtmpgrp00 | cut -d ":" -f3` +thegid=`cat /etc/group | grep ^smbtmpgrp00 | cut -d ":" -f3` # Now change the name to what we want for the MS Windows networking end cp /etc/group /etc/group.bak -cat /etc/group.bak | sed "s/smbtmpgrp00/$1/g" > /etc/group +cat /etc/group.bak | sed "s/^smbtmpgrp00/$1/g" > /etc/group # Now return the GID as would normally happen. echo $thegid -- 2.11.4.GIT