|
|
Keep UID above 501 for login window account display
Every UNIX system I have ever seen has had UIDs organized such that administrators have lower UIDs than hoi polloi. It is also useful if you are writing a program that must only be run by administrators, e.g. a root-owned program with the SetUID bit turned on: Rather than having a list of users that can run it, it can just check if the Real UID is <= 500.
Keep UID above 501 for login window account display
I agree... I've always seen Joe User's UID kept above 500. But for some reason a company I work for has UID's scattered much lower (I think they offset from 100 or something). Mine was 209 -- I have no idea why :(
Not safe
Just assuming that a "normal" user's UID can't be <= 500 isn't a very safe way of doing things. Keeping a list of users in the program is also onerous. Better is to have that list be a UNIX group (see /etc/group on a normal system, the group databse in netinfo). Say, "staff". That way, any program can quickly check the group list to see if a given user should be authorized for a particular purpose. And it's easy to maintain. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.12 seconds |
|