From owner-freebsd-stable Wed Sep 5 14:12:11 2001 Delivered-To: freebsd-stable@freebsd.org Received: from robin.mail.pas.earthlink.net (robin.mail.pas.earthlink.net [207.217.120.65]) by hub.freebsd.org (Postfix) with ESMTP id 7838837B401 for ; Wed, 5 Sep 2001 14:11:56 -0700 (PDT) Received: from blossom.cjclark.org (dialup-209.245.142.21.Dial1.SanJose1.Level3.net [209.245.142.21]) by robin.mail.pas.earthlink.net (8.11.5/8.9.3) with ESMTP id f85LBsb01515; Wed, 5 Sep 2001 14:11:54 -0700 (PDT) Received: (from cjc@localhost) by blossom.cjclark.org (8.11.4/8.11.3) id f85LBp301706; Wed, 5 Sep 2001 14:11:51 -0700 (PDT) (envelope-from cjc) Date: Wed, 5 Sep 2001 14:11:46 -0700 From: "Crist J. Clark" To: "Kozlovsky, Marek" Cc: "'stable@freebsd.org'" Subject: Re: weird group membership Message-ID: <20010905141146.B321@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <31FD3FA70CBED31189E700508B6401718E0CF1@ntexgpra01> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <31FD3FA70CBED31189E700508B6401718E0CF1@ntexgpra01>; from Marek.Kozlovsky@KPNQwest.com on Wed, Sep 05, 2001 at 03:58:54PM +0200 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Sep 05, 2001 at 03:58:54PM +0200, Kozlovsky, Marek wrote: > Hi, > > I wanted to use 'cu -l /dev/cuaa1' so I found out I have to be in 'dialer' > group: > buki@hal9000:/home/buki>ll /dev/cuaa1 > crw-rw---- 1 uucp dialer 28, 129 Aug 29 16:29 /dev/cuaa1 > > So I su-ed to root and did 'pw user mod buki -G wheel dialer' checked with > 'id buki': > root@hal9000#id buki > uid=1001(buki) gid=1001(users) groups=1001(users), 0(wheel), 68(dialer) > > it seems OK, so logged in as buki again, but: > > buki@hal9000:/home/buki>cu -l /dev/cuaa1 > cu: /dev/cuaa1: Permission denied > buki@hal9000:/home/buki>whoami > buki > buki@hal9000:/home/buki>id > uid=1001(buki) gid=1001(users) groups=1001(users), 0(wheel) > buki@hal9000:/home/buki>groups buki > users wheel dialer > > The difference between output from 'id' and 'groups' makes me feel dizzy :( > but when I (logged as buki) specify username (ie. 'id buki') the answer is > right I am not sure if I believe that you really, 'logged in as buki again.' Did you actually log in again as buki and not just go to some already exisiting session? That would explain the differences. Using groups(1) (which is a shell script that calls id(1)) or id(1) with a user argument reads the group(5) file whereas using id(1) with no arguments tells you what the system believes your group membership in the current session to be. This would make sense if you did something like, 1. Log in as buki 2. su(1) to root 3. Make group changes for buki 4. Exit root shell 5. Run the above group(1) and id(1) commands You need to add, 6. Log out from buki's session 7. Log is as buki 8. Run the above group(1) and id(1) commands And see what happens. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message