ldapmodify -D cn=ldapadmin,dc=example,dc=com -w Y0ur4dm!nPwd -H ldap://192.12.34.123/ -f $1 # This script takes one argument - the /path/filenam.ldif of an ldif file. # Refer the documentations for ldif syntax.