<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18999">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial><FONT size=3 face="Times New Roman">> When I do
a getpwnam() on a UID, it reports the username/group as
'file'.</FONT></FONT></DIV>
<DIV><FONT size=2 face=Arial><FONT size=3 face="Times New Roman">I think you
should be calling getpwuid. Is that what you meant to
say?</FONT></FONT></DIV>
<DIV> </DIV>
<DIV>Indy Singh<BR>IndigoSTAR Software -- <A
href="http://www.indigostar.com">www.indigostar.com</A><BR></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=jbl@jbldata.com href="mailto:jbl@jbldata.com">J. Bobby Lopez</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=tpm@to.pm.org
href="mailto:tpm@to.pm.org">Toronto Perl Mongers</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, January 27, 2011 4:52
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [tpm] using getpwnam() on a
system with LDAP</DIV>
<DIV><FONT size=2 face=Arial></FONT><BR></DIV>I've got a system that serves as
an LDAP client, so there are many files/dirs with uid/gid information
retrieved from LDAP.<BR><BR>When I do a getpwnam() on a UID, it reports the
username/group as 'file'.<BR><BR>Is there any way to do the translation from
UID to LDAP username without loading LDAP modules? I'm guessing if 'ls'
shows the correct name, there must be some system call I can use to pull the
same info.<BR><BR>Any insights?<BR><BR>Thanks,<BR>Bobby<BR>
<P>
<HR>
<P></P>_______________________________________________<BR>toronto-pm mailing
list<BR>toronto-pm@pm.org<BR>http://mail.pm.org/mailman/listinfo/toronto-pm<BR></BLOCKQUOTE></BODY></HTML>