I understand that unix user IDs (UIDs) are usually 16 or 32 bit unsigned integers but how can I find out for any given system (in a shell)?
Unix UID Size – How Many Bits?
linuxuidunix
Related Topic
- Linux – How to find out the IP address on a unix-like box
- Linux – Learning to compile things from source (on Unix/Linux/OSX)
- Linux Bash – How to Sort du -h Output by Size
- Linux – Limiting UID range for new local user accounts
- Linux – How to find other end of unix socket connection
- Ubuntu – How to find out if a uid exists
Best Answer
You'll need to look in
<limits.h>
(or one of the files it includes, e.g.,sys/syslimits.h
on OS X) for the#define
ofUID_MAX
.Most recent operating systems (Solaris 2.x, OS X, BSD, Linux, HP-UX 11i, AIX 6) can handle up to two billion (
2^31-2
), so I would assume that and make a workaround for the more obscure systems that don't.