Re: Listusers command
Re: Listusers command
- Subject: Re: Listusers command
- From: Jason Townsend <email@hidden>
- Date: Fri, 11 Mar 2005 15:13:46 -0800
From: Stephane Sudre <email@hidden>
Le 11 mars 05, à 14:42, Chuck Gagnon a écrit :
It makes use of getpwent from libc, I would hope there is a backend
bridge to DirectoryServices just like there is to NIS as such,
perhaps
I'm wrong there. My account which is not in /etc/passwd shows up in
the list it. if the libc functions are to be abandon in favor of an
API then all the BSD tools that make use of them (users, groups,
who...) will need to be retooled.
Well, I was using getpwent in a software too and for one user (not a
user account, a real user), it would not work (the accounts were on a
Windows server IIRC).
With the DirectoryServices, it worked.
In some cases it may not be possible to iterate over all users like
this due to scale reasons. For example, many LDAP servers limit query
results to 500 records, so if there are thousands of users in the
server you won't get all of them. If you instead do a getpwnam()
which is an exact match lookup those users should show up.
Going through the Directory Services APIs allows you to do searches
that will translate into the equivalent LDAP search, while calling
getpwent() over and over and filtering the results will not.
Was that the problem, or was it something else?
-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