Run an application as another user not root
Run an application as another user not root
- Subject: Run an application as another user not root
- From: "Bryan S. Lee" <email@hidden>
- Date: Tue, 03 Jun 2008 16:29:38 -0400
- Thread-topic: Run an application as another user not root
I'm wrestling with having an Applescript App engage by a postscript in
PackageMaker 3. It will run fine except that it is running as root (due to
being started by the installer script) and there are certain steps in the
process that deal with Keychains and System Preferences (attempting to
automatically setup multiple wireless connections) that require it be run as
the current user.
I've tried a couple of things and either can't get it to work correctly or
only partially work (which is more confusing).
I've tried running my script as all of the following:
open /tmp/fakename/fakename/setupwireless.app (runs as root as far as I can
tell and won't show the login.keychain in Keychain access)
su ${USER} -c /tmp/fakename/fakename/setupwireless.app (again, runs as root)
osascript -e "do shell script \"open
/tmp/fakename/fakename/setupwireless.app\" administrator privileges true"
(works for showing the correct login.keychain in Keychain access, but won't
actually put the password keychain item for the wireless setup, created by
sys prefs into the correct keychain for the local user)
su ${USER} -c osascript -e "do shell script \"open
/tmp/clemson/cuwireless/setup_cu_wireless.app\" administrator privileges
true" (get an interesting error about not being able to get to the keychain
and wants to reset to defaults)
Any ideas or other methods to try and run this particular app as the user
rather than root would be appreciated.
--
Bryan S. Lee
Information Resource Consultant II
Computer Support Services
Clemson Computing and Information Technology
Clemson University
864-656-3716
email@hidden
ACHDS 10.4, MCP NTS/NTW
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden