Page 1 of 1

Problems while connecting to AD

Posted: Mon Mar 21, 2011 2:04 pm
by jogi99
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

Re: Problems while connecting to AD

Posted: Thu May 12, 2011 8:37 am
by krzee
where is this script?

Re: Problems while connecting to AD

Posted: Thu May 12, 2011 9:05 am
by jogi99
Hi,

the script can be found here topic2403.html

Cheers,
Joachim

Re: Problems while connecting to AD

Posted: Thu May 12, 2011 9:58 am
by krzee
thank you, cool stuff!