Problems while connecting to AD

Scripts which allow the use of special authentication methods (LDAP, AD, MySQL/PostgreSQL, etc).
Post Reply
jogi99
OpenVpn Newbie
Posts: 2
Joined: Mon Feb 14, 2011 2:18 pm

Problems while connecting to AD

Post by jogi99 » Mon Mar 21, 2011 2:04 pm

Hi,

I've tried to get the pretty nice solution with the script openvpn-super.pl ready in my environment, but it failed every time. After spending some time I found the issue and would like letting you know about it in order let you run not into the same issue ;)
In my environment the the name of the group looks like this (configured in the config file):

...
group = cn=VPNUsers,ou=Security Groups,ou=MyBusiniss, dc=mydomain-test1,dc=local
...

The problem is caused by the hyphen in the dc entry "mydomain-test1" which will let the perl script to fail. The solution is pretty simply, but requires some perl or at least scripting experiences. To solve the issue you need to change the regular expression in line 457 of script openvpn-super.pl
Please change from
if ($_ =~ m/^\s*group\s*=\s*/[\w|=| |,]+)\s*$/i) {
to
if ($_ =~ m/^\s*group\s*=\s*/[\w|=| |,|-]+)\s*$/i) {

This solves the issue and will allow you to use domain name as I did ;-)

Cheers,
Joachim

User avatar
krzee
Forum Team
Posts: 729
Joined: Fri Aug 29, 2008 5:42 pm

Re: Problems while connecting to AD

Post by krzee » Thu May 12, 2011 8:37 am

where is this script?

jogi99
OpenVpn Newbie
Posts: 2
Joined: Mon Feb 14, 2011 2:18 pm

Re: Problems while connecting to AD

Post by jogi99 » Thu May 12, 2011 9:05 am

Hi,

the script can be found here topic2403.html

Cheers,
Joachim

User avatar
krzee
Forum Team
Posts: 729
Joined: Fri Aug 29, 2008 5:42 pm

Re: Problems while connecting to AD

Post by krzee » Thu May 12, 2011 9:58 am

thank you, cool stuff!

Post Reply