/etc/login.defs defines the max and min uids and gids. There is no formal way to find out the current max UID, as it's not an interesting thing to want to know. you can easily spit the output of "getent passwd" through cut and the likes though.
getent passwd | cut -d: -f4 | sort -n | tail -n1
Last edited by acid_kewpie; 05-24-2012 at 09:35 AM.