I am trying to perform an ldapmodify from a remote host to modify entries on my ldapmaster. I already installed slapd on my host because I need mkntpwd binary, the server is not configured, and I also installed ldap-utils for the ldap tools.When I run the command from the shell it works fine, but not from my script. I am performing the command from the script as follow:.......echo dn: ou=xxx,dc=yyy,dc=zzz changetype: modifyreplace: attributeattribute: ${newValue} \    | ldapmodify -D ${ldapadmindn} -w ${ldappassword} -x -H ldaps://myldapmaster:636 >/dev/null 2>&1.......I tried it also with an ldif file this way:.......(    echo dn: ou=xxx,dc=yyy,dc=zzz    echo changetype: modify    echo replace: attribute    echo attribute: ${newValue}) >> file.ldifldapmodify -D ${ldapadmindn} -w ${ldappassword} -x -H ldaps://myldapmaster:636 -f file.ldif >/dev/null 2>&1.......unfortunately neither nor worked from my script. as I said both versions works fine from the shell. Do you have any idea what I am doing wrong?Thanks in advanced
perform ldapmodify from remote server
ldap
I could resolve this issue by removing the white spaces at line begin of each line follows the echo command. With the ldif file the problem was that the file wasn't empty, after deleting it, it worked fine. Thanks a lotIssue can be marked as resolved