Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Sep 2001 13:26:11 +0200
From:      Francesco Casadei <fcasadei@inwind.it>
To:        freebsd-questions@freebsd.org
Cc:        BOOTSTASHA@aol.com
Subject:   Re: adding a user
Message-ID:  <20010910132611.A1509@goku.kasby>
In-Reply-To: <20010910122659.B1247@goku.kasby>; from fcasadei@inwind.it on Mon, Sep 10, 2001 at 12:26:59PM %2B0200
References:  <5b.1b6fe4cb.28cd68fb@aol.com> <20010910122659.B1247@goku.kasby>

next in thread | previous in thread | raw e-mail | index | archive | help

--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 10, 2001 at 12:26:59PM +0200, Francesco Casadei wrote:
> On Sun, Sep 09, 2001 at 08:53:15PM -0400, BOOTSTASHA@aol.com wrote:
> > I am trying to add a user who has a UID of 38445 (given by my instructo=
r).=20
> > The manual says that you can't have an ID over 32000. How can this be=
=20
> > accomplished.
> >=20
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
> >=20
> > end of the original message
>=20
> It works on FreeBSD 4.4RC:
>=20
> # pw useradd user -u 38445 -g users
> # pw usershow user
> user:*:38445:1001::0:0:User &:/home/user:/bin/sh
> # pw userdel user
> # pw usershow user
> pw: no such user `user'
>=20
> From sys/types.h:
>=20
> typedef __uint32_t  u_int32_t;
> ...
> typedef u_int32_t   uid_t;      /* user id */
>=20
> From i386/include/ansi.h:
>=20
> typedef    unsigned int         __uint32_t;
>=20
> So seems that the uid can be a number in the range 0..4294967295 (i.e.
> 2^32 - 1) for i386.
>=20
> Actually this number is limited to 2147483647:
>=20
> # pw useradd user -u 4294967295 -g users
> pwd_mkdb: 2147483647 > recommended max uid value (65535)
> # pw usershow user
> user:*:2147483647:1001::0:0:User &:/home/user:/bin/sh
>=20
> 	Francesco Casadei
> --=20
> You can download my public key from http://digilander.iol.it/fcasadei/
> or retrieve it from a keyserver (pgpkeys.mit.edu, wwwkeys.pgp.net, ...)
>=20
> Key fingerprint is: 1671 9A23 ACB4 520A E7EE  00B0 7EC3 375F 164E B17B
>=20


> end of the original message

And this is the reason of the soft limit of 65535 (from pwd_mkdb(8)):

ENVIRONMENT
     If the PW_SCAN_BIG_IDS environment variable is set, pwd_mkdb will sup=
=AD
     press the warning messages that are normally generated for large user =
and
     group IDs.  Such IDs can cause serious problems with software that mak=
es
     assumptions about the values of IDs.

--=20
You can download my public key from http://digilander.iol.it/fcasadei/
or retrieve it from a keyserver (pgpkeys.mit.edu, wwwkeys.pgp.net, ...)

Key fingerprint is: 1671 9A23 ACB4 520A E7EE  00B0 7EC3 375F 164E B17B


--BOKacYhQ+x31HxR3
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE7nKNSfsM3XxZOsXsRAihIAJ4x12oJZqG6voOfsC6IHyTsMCG6TwCdGMU5
IRsd7vuvx6KRut9to9X8SUo=
=nQnu
-----END PGP SIGNATURE-----

--BOKacYhQ+x31HxR3--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010910132611.A1509>