Does getpwnam respect /etc/nsswitch.conf?
The manpage  for getpwnam states
  The getpwnam() function returns a pointer to a structure containing the broken-out
  fields of  the  record
  in  the  password  database  (e.g.,  the local password file /etc/passwd, NIS, and 
  LDAP) that matches the
        username name.
This leads me t...
            
           
          
            
            I'm setting up a ZABBIX agent (written in C) on a couple of Ubuntu 64-bit servers.  I usually compile everything in 32-bit unless I specifically need 64-bit (such as database servers.)  The servers in question will be hosting virtual servers and have 8GB RAM, hence why I've kept them 64-bit.
If the ZABBIX agent starts as root, it tries ...
            
           
          
            
            How can I obtain an array with uid and names?
I could iterate from 0 to 99999 and do a getpwnam(). 
However most machines have less than 5 accounts, so it's not optimal. I don't know what framework is responsible for this and thus I have no clue what to search for.
Is there a more optimal solution that can traverse the accounts?
Edit:...
            
           
          
            
            Attempting to set up Samba + OpenLDAP using nss_ldap.
After joining Windows7 to Samba stand alone PDC, I can not login with a domain account unless that account is also added to the /etc/passwd file.
I get:  user in passdb, but getpwnam() fails!
Everything I've read points to an NSS_LDAP issue yet, getent passwd shows users perfectly ...
            
           
          
            
            does tcl have a standard way of doing NSS lookups (getpwnam, setpwent,...)
...