• 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: What's the official way to detect a user has administration privileges?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's the official way to detect a user has administration privileges?


  • Subject: Re: What's the official way to detect a user has administration privileges?
  • From: Nigel Kersten <email@hidden>
  • Date: Tue, 24 Jun 2008 08:20:25 -0700
  • Domainkey-status: no signature


On Jun 24, 2008, at 3:32 AM, Stéphane wrote:

What's the official way to detect a user has administration privileges (from a Mac OS X point of view)?

OpenDirectory (how?) or does the fact that the user belongs to group admin is enough (with the exception of root)?

if you do just want to check whether a user is a member of the local admin group (though as others have pointed out, this may not be what you want)


$ dseditgroup -o checkmember -m adminuser -n . admin ; echo $?
yes adminuser is a member of admin
0


$ dseditgroup -o checkmember -m notadmin -n . admin ; echo $? no notadmin is NOT a member of admin 2




-- Nigel Kersten http://explanatorygap.net





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: What's the official way to detect a user has administration privileges?
      • From: Paul Nelson <email@hidden>
References: 
 >What's the official way to detect a user has administration privileges? (From: Stéphane <email@hidden>)

  • Prev by Date: Re: What's the official way to detect a user has administration privileges?
  • Next by Date: Re: What's the official way to detect a user has administration privileges?
  • Previous by thread: Re: What's the official way to detect a user has administration privileges?
  • Next by thread: Re: What's the official way to detect a user has administration privileges?
  • Index(es):
    • Date
    • Thread