LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] User tool

[ILUG] User tool

Liam Bedford * at lbedford.org
Wed Dec 6 16:06:33 GMT 2000


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




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell