Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!ziploc!eps From: eps@toaster.SFSU.EDU (Eric P. Scott) Newsgroups: comp.sys.next Subject: Re: getpwnam on the NeXT Message-ID: <1752@toaster.SFSU.EDU> Date: 17 Jun 91 10:29:04 GMT References: <3NG-_4-@engin.umich.edu> Reply-To: eps@cs.SFSU.EDU (Eric P. Scott) Organization: San Francisco State University Lines: 13 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're confused. getpwnam() on the NeXT knows about NetInfo and YP/NIS, and does "the right thing." *DO NOT* attempt to read /etc/passwd directly nor use getpw()--stick with getpwnam() and getpwuid(). If you use setpwfile(), all bets are off. -=EPS=-