From owner-freebsd-questions@FreeBSD.ORG Thu Dec 21 17:47:15 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 DC19416A416 for ; Thu, 21 Dec 2006 17:47:15 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.187.76.162]) by mx1.freebsd.org (Postfix) with ESMTP id 3A09F13C45A for ; Thu, 21 Dec 2006 17:47:15 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from [IPv6:::1] (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.13.8/8.13.8) with ESMTP id kBLHW3CB030986; Thu, 21 Dec 2006 17:32:03 GMT (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <458AC50C.7030206@infracaninophile.co.uk> Date: Thu, 21 Dec 2006 17:31:56 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 1.5.0.8 (X11/20061216) MIME-Version: 1.0 To: lveax References: <576dcbc20612201323y24905c64u844d56312356af38@mail.gmail.com> In-Reply-To: <576dcbc20612201323y24905c64u844d56312356af38@mail.gmail.com> X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigD78DA8DBEE0F4209E700CBA4" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (smtp.infracaninophile.co.uk [IPv6:::1]); Thu, 21 Dec 2006 17:32:18 +0000 (GMT) X-Virus-Scanned: ClamAV 0.88.7/2367/Thu Dec 21 16:35:52 2006 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, DKIM_POLICY_TESTING,NO_RELAYS autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on happy-idiot-talk.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: Thu, 21 Dec 2006 17:47:15 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD78DA8DBEE0F4209E700CBA4 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable lveax wrote: > hey all. >=20 > i found a problem just now. > i added this user(in wheel group)with sysinstall when i install freebsd= =2E >=20 > $ id > uid=3D1001(user) gid=3D0(wheel) groups=3D0(wheel), 5(operator), 69(netw= ork) >=20 > $ pw group show wheel > wheel:*:0:root >=20 > i can't see it in the wheel group users list? >=20 > 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=20 uid=3D3(bin) gid=3D7(bin) groups=3D7(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 --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enigD78DA8DBEE0F4209E700CBA4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFisUS8Mjk52CukIwRCJsyAJ4kNvuTi/Q+XfcNl2oFMB6wJcFqvACcCUW/ 6sEiFOenKGN297SvNmO8pDI= =cVBd -----END PGP SIGNATURE----- --------------enigD78DA8DBEE0F4209E700CBA4--