• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determine if user can admin
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determine if user can admin


  • Subject: Re: Determine if user can admin
  • From: Eric Long <email@hidden>
  • Date: Tue, 19 Apr 2005 09:04:31 -0700

> 1) Something like "id | grep admin".

>> 1. Maybe this information is stored in the Open Directory information
>> on this user account.
>>
>> 2. Otherwise, you can find the group of the user and the additional
>> group and look for the gid for the admin group.

>>> The Carbon way:
>>>
>>> err = AuthorizationCreate(&user_rights,
>>> kAuthorizationEmptyEnvironment, user_flags, &user_authorizationRef);
>>>
>>> See Authorization Services docs for more details ..
>

I'll check out these suggestions.  Thanks for your ideas.

I was really wondering if it is sufficient to check if a user is root or in
the admin group.

I'm trying to set things up in a manner that is more convenient for a user
who is allowed to administer the computer.  Sort of like how the OS used to
require you to authorize constantly to do just about anything, then things
were made easier for users who are designated administrators, so they only
have to authenticate to perform tasks that actually alter the system.

I noticed the OS adds users with the "Allow user to administer this
computer" checkbox set to the sudoers file.  I was just looking for a means
that would ensure whatever I do is in sync with whether or not a user has
that checkbox set for his or her account.


Eric


 _______________________________________________
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

  • Follow-Ups:
    • Re: Determine if user can admin
      • From: Quinn <email@hidden>
References: 
 >Re: Determine if user can admin (From: Markus Hitter <email@hidden>)

  • Prev by Date: Re: Using ctl_enqueuembuf
  • Next by Date: Re: Cann't make connection to a graphics IOService
  • Previous by thread: Re: Determine if user can admin
  • Next by thread: Re: Determine if user can admin
  • Index(es):
    • Date
    • Thread