I have an ldif file that I am cleaning up in order to import in into Oracle OID which is Oracles LDAP. It has to be in a specific format in order to load. Another problem I am getting stuck at is there is an LDAP attribute the I need to add to each of the 100,000 employees. I need to add cn which should contain the same as uid
current example:
dn: cn=0123456,cn=users,dc=company,dc=com
telephonenumber: 123-246-7890
mail: employee@company.com
uid: 0123456
givenname: New
sn: Employee
orclisVisible: True
objectclass: person
objectclass: organizationalperson
objectclass: inetorgperson
objectclass: orcluserv2
goal:
dn: cn=0123456,cn=users,dc=company,dc=com
telephonenumber: 123-246-7890
mail: employee@company.com
uid: 0123456
cn: 0123456
givenname: New
sn: Employee
orclisVisible: True
objectclass: person
objectclass: organizationalperson
objectclass: inetorgperson
objectclass: orcluserv2
I know that if I go into vi and put the cursor on uid then hit yy then P the line will be duplicated below the current line. But then I would need to change the second occurence of the label in a group of uid to cn. Any help would be greatly appreciated.
current example:
dn: cn=0123456,cn=users,dc=company,dc=com
telephonenumber: 123-246-7890
mail: employee@company.com
uid: 0123456
givenname: New
sn: Employee
orclisVisible: True
objectclass: person
objectclass: organizationalperson
objectclass: inetorgperson
objectclass: orcluserv2
goal:
dn: cn=0123456,cn=users,dc=company,dc=com
telephonenumber: 123-246-7890
mail: employee@company.com
uid: 0123456
cn: 0123456
givenname: New
sn: Employee
orclisVisible: True
objectclass: person
objectclass: organizationalperson
objectclass: inetorgperson
objectclass: orcluserv2
I know that if I go into vi and put the cursor on uid then hit yy then P the line will be duplicated below the current line. But then I would need to change the second occurence of the label in a group of uid to cn. Any help would be greatly appreciated.