Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!uwm.edu!bionet!parc!news From: Lovstrand@EuroPARC.Xerox.COM (Lennart Lovstrand) Newsgroups: comp.sys.next Subject: Re: getpwnam on the NeXT Message-ID: <1991Jun17.103226.19021@parc.xerox.com> Date: 17 Jun 91 10:32:26 GMT References: <3NG-_4-@engin.umich.edu> Sender: news@parc.xerox.com Organization: Xerox PARC Lines: 22 In article <3NG-_4-@engin.umich.edu> cerberus@geo.lsa.umich.edu (R. Eric Bennett) writes: > Is there an equivalent funtion for getpwnam() on the NeXT? getpwname() > returns a structure according to a login name by reading the passwd file. > Of course, thanks to NetInfo, /etc/passwd doesn't have any valid users. > How do I get the user's info since it can't be looked up in the passwd file? You use getpwnam(). Seriously, getpwnam() is _the_ generic interface to use to find out passwd information about any user that is known to your system. It doesn't matter if your machine uses /etc/passwd, NetInfo or Yellow Pages (ugh, I mean NIS), the same function applies to all of them. (Of course, if you do use NetInfo, then /etc/passwd is ignored just as you said yourself.) By the way, the same applies to getgrent(), gethostbyname(), getservbyname(), etc. [NeXT Mach 2.1] Cheers, -- --Lennart R _A _ N_ K Rank Xerox EuroPARC, 61 Regent St, Cambridge, UK \/ |_ |_) | | \/ Heart-of-Gold, NeXTcube at EuroPARC, NeXT Mach 2(1) /\ |_ | \ |_| /\ TOPS-20 Command processor 7(109)-8 [alpha] E u r o P A R C