Pass credentials to windows command

Post Reply
OpenVpn Newbie
Posts: 2
Joined: Tue Mar 31, 2020 2:34 am

Pass credentials to windows command

Post by rafaelt » Tue Mar 31, 2020 2:46 am

Hi all.

I have just got OpenVPN up and running in my environment, using the virtual appliance, via LDAP for authentication.
Ideally, I want to be able to map the users AD home drive via a client connect script. For testing purposes, i have mapped some of our shared drives, but with the user details and password hard coded in a net use command.

Is there a way to utlize the ldap credentials passed to OpenVPN to authenticate to a script ?
Say for example $username and $password come from OpenVPN, I could write a client connect script such as
net use H: \\server\share\$username /user:domain\$username $password
, or something along those lines atleast.

Hopefully this is possible.

Post Reply