cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum UID and GID

SOLVED
Go to solution
SGK
Occasional Advisor

Maximum UID and GID

Hi,

What is maximum number for UID and GID for Redhat Linux and OpenBSD?

TIA.
9 REPLIES
Alexander Chuzhoy
Honored Contributor
Solution

Re: Maximum UID and GID

Maximum recommended is: 65535
But the maximum allowable uid/gid is:
4294967295
Alexander Chuzhoy
Honored Contributor

Re: Maximum UID and GID

True for Redhat and FreeBSD.
SGK
Occasional Advisor

Re: Maximum UID and GID


Is it same for OpenBSD?
Alexander Chuzhoy
Honored Contributor

Re: Maximum UID and GID

Never worked on this distribution.
I suggest you to create a user there and to play with it:
first try to assign it the mentioned UID - in case it works -try a bigger one.
Anyway - I wouldn't recommend you to work with something that isn't recommended by the system (obviously).
Cheers.
Steven E. Protter
Exalted Contributor

Re: Maximum UID and GID

Shalom,

I believe this is a System V convention.

Its time to test it though, it will do no harm creating a dummy user and editing /etc/passwd and /etc/group for test purposes.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
SGK
Occasional Advisor

Re: Maximum UID and GID

Hi,

I think the Maximum UID/GID for OpenBSD is 2147483647. I tried the following steps in OpenBSD:

# groupadd -g 42949672950 testgrp
# more /etc/group
testgrp:*:2147483647:

# useradd -g testgrp -u 42949672950 testusr
# more /etc/passwd
testusr:*:2147483647:2147483647::/home/testusr:/bin/csh

Based on the above result, I guess its 2147483647.

Correct?
Alexander Chuzhoy
Honored Contributor

Re: Maximum UID and GID

I'd assume so.

Best regards.
Stuart Browne
Honored Contributor

Re: Maximum UID and GID

*chuckles* they signed the longint :P
One long-haired git at your service...
Ryan Goh
Frequent Advisor

Re: Maximum UID and GID

In Red Hat Enterprise Linux 2.1 and later versions the Linux kernel supports 32 bit limits for the UID and GID. The UID and GID are stored internally as signed integer values, so there are 31 bits available to store UID's and GID's. This results in a system limit of 2,147,483,648.

For full info, go to http://kbase.redhat.com/faq/FAQ_80_6231.shtm