On Wed, Dec 06, 2000 at 03:55:12PM +0000, Paul Kelly came forth with:
> John McDonnell wrote:
>> >> What's wrong with /etc/passwd? That's got a complete list in a fixed
> >> machine-readable format,
> >
> > one caveat... if the machine is bound to an NIS host, it won't list the
> > user accounts on the other machine, obviously enough...
>> True, true. And then you've got all those Other auth modules that PAM
> has been busy sprouting - LDAP and SMB for starters.
>I guess you could always do something like:
#include <stdio.h>
#include <stdlib.h>
main(void)
{
struct passwd *userpwentry;
setpwent();
while ( userpwentry = getpwent() ) {
printf("Username %s\n", userpwentry->pw_name);
}
return 0;
}
or something like that... might not work straight off.. :)
L.
--
Liam Bedford | Four thousand holes in Blackburn, Lancashire
System Administrator | And though the holes were rather small
WBT Systems, Block 2, | They had to count them all
Harcourt Centre, Harcourt St. | Now they know how many holes it takes to fill
01-4170100 | The Albert Hall
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!