Re: Determine if user can admin
Re: Determine if user can admin
- Subject: Re: Determine if user can admin
- From: Markus Hitter <email@hidden>
- Date: Tue, 19 Apr 2005 09:47:01 +0200
Am 19.04.2005 um 01:44 schrieb Eric Long:
When setting up accounts in Mac OS X, the Accounts pref panel has a
checkbox
for user accounts labeled, "Allow user to administer this computer".
This is a checkbox wether the user is member of the group "admin" or
not.
How can I programmatically determine if my application is being run
for a
user who is allowed to administer the computer vs. one who isn't?
1) Something like "id | grep admin".
2) Try to execute you task anyways and watch for errors.
3) Ask for privileged execution always. This would allow admins,
currently logged in as somebody else, as well.
Guys like myself do their work as an unprivileged user just to be sure
to get asked for a password before some app tries to "improve" the
system. :-)
HTH,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden