4115 Views 10 Replies Latest reply: Nov 4, 2010 6:14 PM by jsd2
The app is GNS3..In order for me to work with the tap drivers and GNS3, I need to run the application as root so I can save it.
Here was my original situation, I run GNS3 as root and I created a tap interface. I assigned an ip address and subnet mask to it. I saved my project and next time I opened it, it said that i couldn't create the interface. I opened it with root access and I got it back but the ip address and mask were gone.
Now, I am trying to open it with root access so I don't have any issues.
You'd be better off creating a LaunchDaemon that changes the permissions on the bpf devices. For example, one called org.tcpdump.chmod_bpf.plist with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
Then in /usr/local/bin, you have the chmod_bpf script (owner root:wheel, perm 755) with the contents:
chgrp admin /dev/bpf*
chmod g+rw /dev/bpf*
That way you can set up interfaces without having to run programs as root.
Basically, this is the setup for Wireshark, which I modified from a startup item to a LaunchDaemon following similar advice on the tubes (I take no credit for the idea at all).
I apologize but I am not a developer and I have little knowledge when it comes to Mac os x folder structure; therefore, it is hard for me to implement some of those scripts you have suggested.
How do I do an applescript? Remember, I don't want just to run terminal as a root but the application itself. I don't want to use terminal every time I have to open GNS3.
Did you look at Pseudo ?
It's a very old program, but it still seems to work in OS X 10.6.
You can drag an application icon into the Pseudo window to run the app as root, or you can use Pseudo's File menu to easily create and save a "Launch Document" for an application. Double-clicking such a Launch Document then runs the application as root. You can optionally store the admin password needed for authentication in your keychain.