Please note that I have used this approach to import users from a different OID environment. You will have to replace the exact server details for your export/import commands below
1. Export the users from a different environment:
ldapsearch -h SOURCEHOST -p PORT -D cn=orcladmin -w PASSWORD -L -b "ou=production,cn=users,dc=org" -s sub "objectclass=*" >exp_OU.ldif
2. Get the count of users is Source environment
grep "cn=users" exp_OU.ldif
wc -l
3. Remove the authentication rows from the file
grep -v "authpassword" exp_OU.ldif > PROD_OU.ldif
4. SCP the final export file to the destination
Use SCP or SFTP
5. Import the users using bulk approach
ldapadd -h TARGETHOST -p PORT -D "cn=orcladmin" -w PASSWORD -c -v -f PROD_OU.ldif
You may schedule this in background if numbers of users are high.
Put the above command in a shell script and run it:
nohup "bulkadd.sh" > oidadd.log &
6. Verify the count of Users imported.
grep "cn=users" exp_OU.ldif
wc –l
7. Login as a specific OID user and confirm you can login through OIDDAS
No comments:
Post a Comment