The LDAP is a Sun LDAP directory, nothing fancy, just a single directory server for POC purposes. This test will be run against machines in the DC to verify that they can connect/bind successfully, then output to one of two lists, (i.e.bind=yes, then output to bind.xml, bind=no, then output to nobind.xml), and nothing more.
I can check this individually using lsldap - a passwd <LDAP_USER>, on a machine that has it's ldap.cfg file configured correctly. My question is can this be scripted to run and see if certain machines are configured and can bind to that server also.
---------- Post updated at 01:17 PM ---------- Previous update was at 12:39 PM ----------
You're correct, there's not supposed to be a space. I typed it freehand, no paste lol...
For clarity, yes, this command works fine. If the machine is connected to the ldap directory where the user I choose to inout resides, then it will return the DN and other info.
My need goes beyond the command....I need a script that will check OS, run the lsldap command if AIX 5.3 or 6.1, if result returns correctly, then list machine in the proper xml. If not, then list machine in the other xml. Another script (that I am not responsible for) will come and vacuum up these xml files later and include them in a much bigger list. It's just looking for one of two possible filenames on my end.
The LDAP user, LDAP directory, and xml files are really extraneous. I just need a script that I can edit to input a user on the LDAP directory that I know is there, edit the xml out filenames, and will just go and check if the user exists then output that machine name to a yes or no xml. Hopefully I made sense ; )
Thanks you,
D