Re: netinfo header files on Panther
Re: netinfo header files on Panther
- Subject: Re: netinfo header files on Panther
- From: Chris Vitale <email@hidden>
- Date: Fri, 15 Jul 2005 16:55:09 -0400
Hello,
Since new users are not added to /etc/passwd I doubted that the standard
C password functions would work. I thought I'd have to use Apple's
fancy pants APIs. getpwent worked just fine.
Thanks,
vitale
On Fri, 2005-07-15 at 13:21 -0700, Jason Townsend wrote:
> On Jul 15, 2005, at 12:20 PM, Finlay Dobbie wrote:
> > On 7/15/05, Chris Vitale <email@hidden> wrote:
> >> I need to find all users and UIDs on a local system from a
> >> daemon. I'd
> >> like to use the netinfo API (rather than command line tools) but I
> >> can't
> >> locate netinfo/ni.h on my local machine or in an SDK on the apple
> >> site.
> >> What am I missing?
> >
> > The NetInfo API is deprecated and not supported. Don't use it.
> >
> > The recommended replacement is the Open Directory (né Directory
> > Services) API.
> >
> > If all you need is to get a list of the users and UIDs, then you can
> > probably get away with just using getpwent().
>
> Open Directory API documentation is here:
>
> http://developer.apple.com/documentation/Networking/Conceptual/
> Open_Directory/
>
> It's often not necessary to do an exhaustive enumeration... if you
> could explain why you want to do that there might be a more efficient
> approach that would scale better in situations where there are
> thousands or hundreds of thousands of users.
>
> -Jason
_______________________________________________
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