----- Original Message -----
Hi to all,
I'm trying write a script shell to simplifies the change of pass of
You may prefer to look for some existing scripts/tools. For example, I have:
which can work as a shell command or as a CGI. I currently use it in conjunction with the
which notifies my users by email that their passwords will expire.
Run 'perldoc xxx.pl' to see the documentation for each script.
Then I write
param=`echo "ldapsearch -x -W -D
exec `echo "$param"`
the line param=... produces a command line that when I write directly
in the term it works, however in the line exec "$param" I am
solicitated my LDAP pass (like in directly term) but when I type I get
ldapsearch -x -W -D "uid=inacio,ou=People,dc=ifce,dc=edu,dc=br" -b
Enter LDAP Password:
ldap_bind: Invalid DN syntax (34)
additional info: invalid DN
You should probably compare the logs on the LDAP server for the two binds, and see if they
differ. I suspect a difference introduced by shell quoting. I wouldn't use exec, but
rather just call ldapsearch directly.
But, then, shell quoting, handling of spaces etc. are reasons to avoid shell scripting for
serious LDAP work.