Posted on 09-15-2010 08:32 AM
I wanted to share how we solved the issue of getting VPN settings to our end
users. It is something that I banged my head against for months; I'm hoping
that I can save someone else some pain.
In our solution, we use the script from the resource kit, but as it does not
populate the username in the Account file it didn't meet our needs.
So I made two changes.
I save the exported VPN settings in a file called VPN.xml and I edited it to
add USERNAME in the AuthName key.
Then I added a variable to the importVPN script,
vpnTempPath="/tmp/VPN.xml" (I use tmp in my script, but you could set the
path to anywhere)
and then added this line:
cat $vpnTempPath | sed -e "s/USERNAME/$3/" >$vpnFilePath
Which reads in the VPN.xml file, searches for USERNAME and replaces it
with the value of the logged in user ($3) and then writes the file out to
the location specified by vpnFilePath.
Then the rest of the script (written by Nick Amundsen at JAMF) takes over
and imports the .networkconnect file and clicks the various buttons that
need to be clicked.
Maura Fennelly
Technology Department
Archbishop Mitty High School
mfennelly at mitty.com
408.324.4243
Posted on 09-16-2010 05:08 AM
Well done. Bonus points for successfully navigating sed. :)
--
Jared F. Nichols
Desktop Engineer, Client Services
Information Services Department
MIT Lincoln Laboratory
244 Wood Street
Lexington, Massachusetts 02420
781.981.5436
Posted on 11-06-2012 08:49 AM
Thanks for the awesome help! It got us going on our own VPN script.
Posted on 11-06-2012 12:04 PM