Rick Stevens wrote:
Michael Ströder wrote:
Rick Stevens wrote:
From the script: ldapadd -U root -w 'FuNkyP@sswd' -f /tmp/userdata.ldif [..] ldapadd -U root -w 'FuNkyP@sswd' -f /tmp/userdata.ldif
Maybe different handling of the single quotes around the password in your user shell and the script's shell? Just a wild guess though.
Well, I'm doing the single quotes to hide any special characters (the actual password contains a bang ("!") in it).
I vaguely remember that I had problems with ! even when quoted. How about setting and trying another password.
Those issues are exactly the reasons why I always recommend to use a decent scripting language like Perl, Python or others with a decent LDAP module instead of a shell-script which invokes the command-line tools. Escaping/quoting rules for strings and also error handling is much better there.
Ciao, Michael.