Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Dec 2006 17:31:56 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        lveax <lveax.m@gmail.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: I can't see my user name in `pw group show wheel`
Message-ID:  <458AC50C.7030206@infracaninophile.co.uk>
In-Reply-To: <576dcbc20612201323y24905c64u844d56312356af38@mail.gmail.com>
References:  <576dcbc20612201323y24905c64u844d56312356af38@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?458AC50C.7030206>