From owner-freebsd-questions@FreeBSD.ORG Fri Dec 22 08:21:01 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C53E616A47B for ; Fri, 22 Dec 2006 08:21:01 +0000 (UTC) (envelope-from lveax.m@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.236]) by mx1.freebsd.org (Postfix) with ESMTP id 74F6B13C4A6 for ; Fri, 22 Dec 2006 08:20:57 +0000 (UTC) (envelope-from lveax.m@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so2567887wxc for ; Fri, 22 Dec 2006 00:20:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FJyITb70ATiJVlqUXqeMIjdnX0gN2M4tcbtjYCcqdEaZetqX4Rue9nyuzjbvORqsH8IhX0Oha/8UNtsR74GGTdmqC/qywe9m/yGFfjRy3Z64zLl5tUQ++cstb8Cj/QfEHlPqwYH9rErfFumaj24qg47o1YgI1gsAq7t6+3SKKi0= Received: by 10.90.93.6 with SMTP id q6mr9165393agb.1166775656972; Fri, 22 Dec 2006 00:20:56 -0800 (PST) Received: by 10.90.88.12 with HTTP; Fri, 22 Dec 2006 00:20:56 -0800 (PST) Message-ID: <576dcbc20612220020n108d5762occ78bd3c5f2abbce@mail.gmail.com> Date: Fri, 22 Dec 2006 16:20:56 +0800 From: lveax To: "Matthew Seaman" In-Reply-To: <458AC50C.7030206@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <576dcbc20612201323y24905c64u844d56312356af38@mail.gmail.com> <458AC50C.7030206@infracaninophile.co.uk> Cc: freebsd-questions Subject: Re: I can't see my user name in `pw group show wheel` X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2006 08:21:01 -0000 On 12/22/06, Matthew Seaman wrote: > lveax wrote: > > hey all. > > > > i found a problem just now. > > i added this user(in wheel group)with sysinstall when i install freebsd. > > > > $ id > > uid=1001(user) gid=0(wheel) groups=0(wheel), 5(operator), 69(network) > > > > $ pw group show wheel > > wheel:*:0:root > > > > i can't see it in the wheel group users list? > > > > but when i add a new user with adduser,it will in the list. > > That's because you've made 'wheel' the primary group for that > user, which is probably not exactly what you intended. > > The primary group is defined in /etc/master.passwd -- the gid > number is put into the third field. Eg: consider the standard > system user bin: > > happy-idiot-talk:~:% id bin > uid=3(bin) gid=7(bin) groups=7(bin) > happy-idiot-talk:~:% pw group show bin > bin:*:7: > happy-idiot-talk:~:% pw user show bin > bin:*:3:7::0:0:Binaries Commands and Source:/:/usr/sbin/nologin > ^ > ^ > > No UIDs are listed as members of group bin in /etc/group, but the > bin user has bin as their primary group deom the password file. > > adduser probably does the common trick of creating a user and a group > of the same name -- in fact, pw(8) will also do precisely that unless > you specify a primary group using the '-g' flag. Use the '-G' flag > instead to specify other groups for the user to belong to. > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > Kent, CT11 9PW > > > > thank you but i find an exception? $ id root uid=0(root) gid=0(wheel) groups=0(wheel), 5(operator) root's primary group is wheel and root is in the list?