aev2061
asked on
change output of ldif file
Been searching the topics and haven't found anything and thought I would ask. I am looking for help. I have output in an ldif file that I need to read the SN and the givenName and overwrite what is in the CN with (givenName SN). This is for an ever growing number of users.
example
from
cn: BLAH
sn: LastName
givenName: FirstName
to
cn: Firstname Lastname
sn: LastName
givenName: FirstName
example
from
cn: BLAH
sn: LastName
givenName: FirstName
to
cn: Firstname Lastname
sn: LastName
givenName: FirstName
ASKER
Thanks for your response. Below is an output of an ldf file so you can see how 2 exports would look like and the file ends just like it is. I guess it would have help had I put a better example in my first post. As you can see better now I am try to replace the
(cn: Person1) with (cn: Bill Smith) and likewise the (cn: Person2) with (cn: Sandy Jones), etc, etc...
dn: CN=BLAH1,OU=OFFICEUSR,OU=O FFICE1,OU= AAA,OU=BB, DC=city,DC =state,DC= com
#changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Person1
sn: Smith
givenName: Bill
displayName: Smith, Bill
sAMAccountName: Person1
userPrincipalName: Person1@city.state.com
mail: Bill.Smith@state.com
dn: CN=BLAH2,OU=OFFICEUSR,OU=O FFICE1,OU= AAA,OU=BB, DC=city,DC =state,DC= com
#changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Person2
sn: Jones
givenName: Sandy
displayName: Jones, Sandy
sAMAccountName: Person2
userPrincipalName: Person2@city.state.com
mail: Sandy.Jones@state.com
(cn: Person1) with (cn: Bill Smith) and likewise the (cn: Person2) with (cn: Sandy Jones), etc, etc...
dn: CN=BLAH1,OU=OFFICEUSR,OU=O
#changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Person1
sn: Smith
givenName: Bill
displayName: Smith, Bill
sAMAccountName: Person1
userPrincipalName: Person1@city.state.com
mail: Bill.Smith@state.com
dn: CN=BLAH2,OU=OFFICEUSR,OU=O
#changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Person2
sn: Jones
givenName: Sandy
displayName: Jones, Sandy
sAMAccountName: Person2
userPrincipalName: Person2@city.state.com
mail: Sandy.Jones@state.com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That works and helps me learn a little more on how this works!
Thanks
Thanks
ASKER
Thanks for the help!
...Terry
Open in new window