in reply to Re: Pointers required on understanding LDAP Authenticating script for openvpn
in thread Pointers required on understanding LDAP Authenticating script for openvpn

Thanks for the reply.

As i explained in first post, there is nothing code present passing username or password, this script is called from openvpn, the configuration file has this line

auth-user-pass-verify /etc/openvpn/new_ldap_authenticate.pl via-env

That's it, i am not sure how openvpn is passing username or password, that configuration file just says above line.
I did tried manually passing username and password inside script, and from STDIN ( removed new line using chomp), and also tried your line, still getting <code> Invalid credentials<code>

Just wanted to know how $ENV stuff is passed/called to/from Perl Script.
And then add for new OU.

Thanks
  • Comment on Re^2: Pointers required on understanding LDAP Authenticating script for openvpn
  • Download Code

Replies are listed 'Best First'.
Re^3: Pointers required on understanding LDAP Authenticating script for openvpn
by influx (Beadle) on Apr 10, 2013 at 15:26 UTC

    The %ENV variable just holds your environment variables. So you should be able to change them values by updating the "username" and "password" environment variables before running your script. You can usually set them while running a script, like

    username="my_user" password="my_pass" perl script.pl