From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075322406734.tru64-unix-managers.marc@archive.invalid> From: "Christopher L. Davis" Date: Thu, 24 Aug 1995 14:10:58 +0000 To: tru64-unix-managers Subject: SUMMARY: UID upper limits X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075322406734 My original message read as follows. Hello. I was just trying to do some research on the possibility of assigning large UIDs. When I tried adduser, it complained that the UID was > 60000. When I tried adding a user by hand, it didn't recognize the user (I tried 200000). The type for uid_t is a 4 byte unsigned int, which should handle the size UID I want to use (under 150000, but some over 60000). Anyone have any ideas? Is the 60000 limit artificially imposed to maintain compatability with other systems, or is there a real reason to limit UIDs to 60000? --------------- My thanks to those who responded. I appreciate their information. I decided not to try messing with large UIDs, as my Service provider and some of those below noted that problems may arise, esp. with NFS to other machines that impose the 2 byte limit strictly. I am enclosing the answers, as they were short and each had some interesting info. Here are the messages. ---------------------- From: Jorn Wilms the max. for the gid is USHRT_MAX, which is defined in /usr/sys/include/arch/alpha/machlimits.h to be 65535. I'm not sure, but I think that's for compatibility with other machines (same limit is set on SUN). I think the last 5000 uids are reserved for system use. ---- From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) In /usr/include/limits.h you'll find UID_MAX defined as USHRT_MAX. I think adduser redefines it own limit despite this one. If I recall recorrectly, this is a bug that will be fixed in a future release. The most likely reason for it being USHRT_MAX is compatibility with system still using shorts for the UID. ---- From: "Miguel Mena (Digital UNIX Support Switzerland)" see /usr/include/sys/limits.h: #define UID_MAX USHRT_MAX /* max value for a user or group ID */ in /usr/include/machine/machlimits.h: #define USHRT_MAX 65535U /* max value for an unsigned short */ ---- From: "Anthony D'Atri" Some OS's seem to only allow one to go up to 32k-1 or so, so that's the safest bet. ---- From: Spider Boardman UFS only supports 16 bits of UID on-disk. There may be some utilities which assume that a short or a ushort can hold a UID, still, too. ADVfs does support 32-bit UIDs on-disk, I'm told, but I haven't tried to verify that. The login program and its library code do support 32-bit UIDs, though. It looks like it should be possible to have a user with a large UID, but that user won't be able to own any files on UFS filesystems, or over NFS to UFS filesystems. ---- From: "Danny J. Mitzel" from passwd(4): >> The allowable values for the UID are unsigned numbers from 0 to 65535. ---- From: Mike Iglesias I believe the 60000 limit is a Posix thing. The actual limit for Digital Unix is 65535. ----------------------------- Thanks again everyone. Chris -- Christopher L. Davis Systems and Network Administrator The Principia PHONE: (314)-434-2100 13201 Clayton Road FAX: (314)-275-3538 St. Louis, MO 63131 INTERNET: cld@prin.edu