[tpm] using getpwnam() on a system with LDAP

Indy Singh indy at indigostar.com
Thu Jan 27 18:17:12 PST 2011


> When I do a getpwnam() on a UID, it reports the username/group as 'file'.
I think you should be calling getpwuid.  Is that what you meant to say?

Indy Singh
IndigoSTAR Software -- www.indigostar.com

  ----- Original Message ----- 
  From: J. Bobby Lopez 
  To: Toronto Perl Mongers 
  Sent: Thursday, January 27, 2011 4:52 PM
  Subject: [tpm] using getpwnam() on a system with LDAP


  I've got a system that serves as an LDAP client, so there are many files/dirs with uid/gid information retrieved from LDAP.

  When I do a getpwnam() on a UID, it reports the username/group as 'file'.

  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.

  Any insights?

  Thanks,
  Bobby



------------------------------------------------------------------------------


  _______________________________________________
  toronto-pm mailing list
  toronto-pm at pm.org
  http://mail.pm.org/mailman/listinfo/toronto-pm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20110127/87f86752/attachment.html>


More information about the toronto-pm mailing list