My question is: How would I open both files, read in all of the contents into arrays, key in on the username as a match-point and update the LDIF file with data from the employee database?
This is what the employee data contains:
Here is data from the LDIF file:dn: uid=simpsonh givenName: Homer sn: Simpson department: Nuclear Control Center buildingName: Radioactive Hall telephoneNumber: 218 555-6793 faxNumber: 218 555-6798 title: Nuclear Control Operator manager: uid=burnsm
dn: uid=simpsonh,ou=People,dc=sfnp,dc=com userPassword:: e1NTSEF9dkI0NnhHT1A5MTBdgfsdghfSFWHDFW239jhsdv= cn: Homer Simpson givenName: Homer sn: Simpson mail: simpsonh@sfnp.com loginShell: /bin/ksh objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: posixAccount objectClass: operator uidNumber: 111 gidNumber: 101 uid: simpsonh timeOut: 1128100385 auditDate: Mon Nov 7 04:50:00 2005 memberOf: cn=Operators,ou=Groups,dc=sfnp,dc=com ssn: 1111 firstTime: 0 homeDirectory: /export/home/simpsonh
...and this is what it should look like when all said and done:
dn: uid=simpsonh,ou=People,dc=sfnp,dc=com userPassword:: e1NTSEF9dkI0NnhHT1A5MTBdgfsdghfSFWHDFW239jhsdv= cn: Homer Simpson givenName: Homer sn: Simpson mail: simpsonh@sfnp.com loginShell: /bin/ksh objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: posixAccount objectClass: operator uidNumber: 111 gidNumber: 101 uid: simpsonh timeOut: 1128100385 auditDate: Mon Nov 7 04:50:00 2005 memberOf: cn=Operators,ou=Groups,dc=sfnp,dc=com ssn: 1111 firstTime: 0 homeDirectory: /export/home/simpsonh department: Nuclear Control Center buildingName: Radioactive Hall telephoneNumber: 218 555-6793 faxNumber: 218 555-6798 title: Nuclear Control Operator manager: uid=burnsm
Thank you in advance for any help and guidance.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |