FROM : Robert Tillyard
DATE : Sun Jan 26 22:55:14 2003
This 'C' program will do it, just copy the bits you need.
#include <sys/types.h>
#include <pwd.h>
int main ()
{
struct passwd *p;
while ((p = getpwent ()))
printf ("id %d = '%s'\n", p->pw_uid, p->pw_name);
}
Regards, Rob.
On Sunday, January 26, 2003, at 09:18 pm, Frank Fenn wrote:
> Hi developer,
>
> I'm relatively new to MacOS, especially Cocoa programming. I would
> like to know, how to get a list of all users
> defined to the system and whether they have administrator rights or
> not.
>
> Scanning the mailing list archive and I've found that there are
> different ways to do this. If I look in the Account
> preferences I can set a user as Administrator, Accounts also doesn't
> show all users compared to Netinfo or
> /etc/passwd.
>
> Is there any code example to get a list of users defined in Accounts.
> I only need users that have a directory in
> /Users.
>
> Any help is appreciated.
>
> --
>
> Regards
> Frank Fenn - Bright Light Software
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Sun Jan 26 22:55:14 2003
This 'C' program will do it, just copy the bits you need.
#include <sys/types.h>
#include <pwd.h>
int main ()
{
struct passwd *p;
while ((p = getpwent ()))
printf ("id %d = '%s'\n", p->pw_uid, p->pw_name);
}
Regards, Rob.
On Sunday, January 26, 2003, at 09:18 pm, Frank Fenn wrote:
> Hi developer,
>
> I'm relatively new to MacOS, especially Cocoa programming. I would
> like to know, how to get a list of all users
> defined to the system and whether they have administrator rights or
> not.
>
> Scanning the mailing list archive and I've found that there are
> different ways to do this. If I look in the Account
> preferences I can set a user as Administrator, Accounts also doesn't
> show all users compared to Netinfo or
> /etc/passwd.
>
> Is there any code example to get a list of users defined in Accounts.
> I only need users that have a directory in
> /Users.
>
> Any help is appreciated.
>
> --
>
> Regards
> Frank Fenn - Bright Light Software
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Frank Fenn | Jan 26, 22:18 | |
| Robert Tillyard | Jan 26, 22:55 | |
| mw | Jan 26, 23:01 | |
| zauhar | Jan 26, 23:26 | |
| Finlay Dobbie | Jan 26, 23:26 | |
| Hasan Diwan | Jan 27, 10:42 |






Cocoa mail archive

