• 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: Administrator password
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Administrator password


  • Subject: Re: Administrator password
  • From: Dan Shoop <email@hidden>
  • Date: Tue, 14 Nov 2006 11:50:10 -0500

At 12:08 AM -0500 11/14/06, Jerry Krinock wrote:
But the first part, getting a list of system admins, has me stumped.  I can
can see what I want by launching NetInfo Manager.  A window named
"local@localhost" opens and shows me a database browser.  If I browse to
groups > admin > users, I see exactly what I want: A list of all the admin
users on my Mac!!

Well maybe.

You're just looking at *one* datastore that Open Directory might be using. There can be admin users also stored in flat files, LDAP, NIS, AD, ...

You'd not know the approproiate stores to check and some might have users in them that aren't actually active stores as well, so this isn't the right approach.

Instead use one of the get group functions in your code to get the membership of what's actively used. But this may have some problems too.

But how can I get this list on the command line?

For NetInfo, use the ni* tools

  Hint: NetInfo Manager is
probably a GUI for some command-line program or it reads a database file,
right?

No. It does it's own stuff directly, it's not a wrapper for a command line tool. .


Maybe something to do with netinfod

Well that's the demon.

--

-dhan

------------------------------------------------------------------------
Dan Shoop                                                   AIM: iWiring
Systems & Networks Architect                      http://www.ustsvs.com/
email@hidden                                http://www.iwiring.net/
1-714-363-1174

"The wise man doesn't give the right answers, he poses the right
questions." -- Claude Levi-Strauss

------------------------------------------------------------------------

iWiring provides systems and networks support for Mac OS X, unix, and
Open Source application technologies at affordable rates.
_______________________________________________
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


References: 
 >Re: Administrator password (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Administrator password (Getting list of admins)
  • Next by Date: Re: UDF file system driver
  • Previous by thread: Re: Administrator password
  • Next by thread: DNS from a Kernel Extension
  • Index(es):
    • Date
    • Thread