Script to check for domain membership

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
craigjw
OpenVpn Newbie
Posts: 17
Joined: Mon May 14, 2012 12:10 pm

Script to check for domain membership

Post by craigjw » Mon Jun 11, 2012 8:31 pm

Hi - I'd like to have a script to either check for domain membership, or to check that the computer is a member of a specific domain. If the check fails the connection should be terminated.

Has anyone achieved this?

Thanks in advance,
Craig

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Script to check for domain membership

Post by janjust » Mon Jun 11, 2012 9:56 pm

any kind of client-side script to determine domain membership can be spoofed , thus it would not make a lot of sense to write one.

If you can live with that, then write a batch file that checks the env var USERDOMAIN. However, there is currently no way to report this info back to the server, hence the client must decide to drop the connection or not. If you want a more full blown check then you should write a separate application which checks domain membership *after* the VPN has come up.

Post Reply