SUMMARY: UID length limit?

From: Riggs, Joan <Joan.Riggs_at_kls.usaka.smdc.army.mil>
Date: Wed, 16 Aug 2000 10:45:24 +1200

First prize goes to Paul Sand for my solution, under Tru64 4.0f:

Using dxkerneltuner, I changed the value of enable_extended_uids from 0 to
1, and rebooted the system.

Caution: some commands will not work or work differently -
see the System Administrators Guide for details
(also attached is a subset of the info)

 <<UIDs and GIDs.doc>>


THANKS to the following people for their responses:

Paul A Sand
You don't say what version you're running.
I think the UID type changed from 16 to 32 bits around Version 4.0D.
In your example, 32 bits would be plenty, 16 bits not enough.
You can switch between 16 and 32 bit UIDs in version 4.0D.
(Apparently. Haven't done it myself.) See:
http://www.unix.digital.com/faqs/publications/base_doc/DOCUMENTATION/V40D_HT
ML/AQTLMCTE/DOCU_002.HTM#extended_uid_intro
The docs seem to say that you just set a kernel variable
`enable_extended_uids' to 1, then reboot. Again, haven't
done it myself. The docs say you can use `dxkerneltuner'
to do it or `sysconfig'. Good luck!

Mary Freesmeyer
I believe it's 64K.

Dr. Tom Blinn
Depends on the version. The default (for compatibility with other UNIX
systems that have the same size limit) is a 16 bit number, which limits
you to at most 5 digits (32,676). You can set an option in sysconfigtab
to enable 32 bit user and group ID numbers; this will give you more than
7 digit (decimal) user IDs. However, not every version of Tru64 UNIX or
Digital UNIX can do this; it was added in something like V4.0E; you'd
need to check the release notes, etc. for the version you are running.

Charles M. Richmond
>From 4.0D and earlier:
   /usr/include/limits.h :
   #define UID_MAX USHRT_MAX /* max value for a user or group ID */
>From 5.0 and later:
   /usr/include/limits.h :
   #define UID_MAX (UINT_MAX - 2) /* max value for a user or group ID
                                            (4 Billion) */
$ getconf USHRT_MAX
65535
$ getconf UINT_MAX
4294967295
So if you are running Tru64 5.0, you can go as high as 4294967293
but if you are running 4.0, you are out of luck.

alan_at_nabeth.cxo.dec.com
Many versions use a 16 bit number with a limit of 32768 or
65536. Some versions may have switched to a 32 bit number,
but you may still have to watch out for software compiled
expecting 16 bit numbers.

John P Speno
It's not a lenght limit. It's an integer limit.
See /usr/sbin/adduser and look for UID_MAX.
In 5.0a, the max uid is 4294967293.

Octave Orgeron
You need to enable 64-bit UID's for that to work. By
default it's 32-bit. I think that I asked this
question some time back in the past. I remember having
to use the dxkerneltuner to change to 64-bit UID's.
You might want to search the list for the summary. If
you don't find it, let me know and I'll check out what
is on my servers.

Jerome M Berkman
Long ago we researched this and found a page saying there are two potential
problems with UIDs > 65k:
1. The quotas.user file size according to stat() or "ls -l" is proportionate
to the largest UID in use. So if you had 100 accounts with UIDs from
1000000 to 1000100, "ls -l" of the quotas.user file will show it as 32 Meg.
However, the actual size, according to "du -s" would be a couple of
kilobytes,
as it is a sparse file. Be careful if you ever copy the file.
If your UIDs are not concentrated, then the file could actually be large.
2. Something about Kerberos compatibility.
Why do you want to do this? UIDs are pretty invisible so I don't see the
advantage.

Nikola Milutinovic
UID is 16-bit integer. On Digital UNIX with C2sec
turned on, you can set it to be 32-bit integer.


-----Original Message-----
From: Riggs, Joan [mailto:Joan.Riggs_at_kls.usaka.smdc.army.mil]
Sent: Friday, August 11, 2000 9:56 PM
To: tru64-unix-managers_at_ornl.gov

What is the length limitation of the UID? Can it be extended to 7 digits?
I cannot find the answer to this specifically in the Compaq documentation;
however, when I try to create a 7-digit UID, the error indicates it is
beyond the limit.

We would like to set the UID to be the employee number
which could be up to 7 digits long in the near future.


Received on Tue Aug 15 2000 - 22:47:24 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT