[CentOS] Determine next UID number

Stephen Harris lists at spuddy.org
Wed Oct 13 22:24:11 UTC 2010


On Wed, Oct 13, 2010 at 04:47:45PM -0400, John Kennedy wrote:
> the next user even though some dim bulb gave a use a UID of 4294967294 (how
> the hell that user can log in with a UID out of range is beyond me unless it
> gets truncated)...

Who says 4294967294 is out of range?

  # grep tstuser /etc/passwd
  tstuser:x:4294967294:10::/:/bin/bash
  # su - tstuser
  -bash-3.2$ id -a
  uid=4294967294(tstuser) gid=10(wheel) groups=10(wheel)
  -bash-3.2$ touch /tmp/x0
  -bash-3.2$ stat /tmp/x0
    File: `/tmp/x0'
    Size: 0               Blocks: 0          IO Block: 4096   regular empty file
  Device: 806h/2054d      Inode: 196620      Links: 1
  Access: (0644/-rw-r--r--)  Uid: (4294967294/ tstuser)   Gid: (   10/   wheel)
  Access: 2010-10-13 18:15:28.000000000 -0400
  Modify: 2010-10-13 18:15:28.000000000 -0400
  Change: 2010-10-13 18:15:28.000000000 -0400

Looks good to me!  The file just created has an ownership with the right
uid.

-- 

rgds
Stephen



More information about the CentOS mailing list