Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: A workaround for Cisco VPN issues after sleep' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: A workaround for Cisco VPN issues after sleep
Authored by: xostential on Jun 25, '05 06:27:53AM

1. Open Script Editor and copy the lines (without the [code] tags) into a new script.
2. Hit the "compile" button (gives the script the opportunity to 'discover' your vpn client application if needed)
3. Save with format set to application and all options deselected (no startupscreen etc)
3. Run this little app instead of running the vpn client. The script restarts the necessary components and then starts the VPN client and subsequently quits itself.

[code]
do shell script "/System/Library/StartupItems/CiscoVPN/CiscoVPN restart"
tell application "VPNClient"
activate
end tell
quit
[/code]

Sweet really.



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: jpgetty on Jun 29, '05 12:48:27PM

except you need to do this with admin privileges - I don't normally run as root.



[ Reply to This | # ]
10.4: A workaround for Cisco VPN issues after sleep
Authored by: xostential on Jun 30, '05 05:07:47PM

I never run as root so two things.

1. Not sure how I left it out of the script (put it down to being cerebrally challenged) but first add the word 'sudo' to the script . .
[code]
do shell script "sudo /System/Library/StartupItems/CiscoVPN/CiscoVPN restart"
tell application "VPNClient"
activate
end tell
quit
[/code]

2. If you want to negate the need to enter your password every time you start VPN . . .
a]. Open terminal application and paste the following line into an open terminal window (you need to be running an admin account) ....
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/sudoers
(if you don't what 'vi' is just paste the line above)

b]. at the prompt type your password. For those not familiar with the terminal you will not see anything when you type - just type your pw and hit enter. This will open the sudoers file in TextEdit ready for editing.

c]. look for the line that says . . "# Cmnd alias specification" and paste the following text below it on a new line.
Cmnd_Alias VPN = /System/Library/StartupItems/CiscoVPN/CiscoVPN

d]. Edit the user privilege lines to look the same as below. (paste replace is easiest)
# User privilege specification
root ALL=(ALL) ALL
%admin ALL=(ALL) PASSWD: ALL, NOPASSWD: VPN

e]. Save and quit TextEdit and Terminal.



[ Reply to This | # ]