Re: How Do I Run a Java App with Superuser Privileges?
Re: How Do I Run a Java App with Superuser Privileges?
- Subject: Re: How Do I Run a Java App with Superuser Privileges?
- From: Guy English <email@hidden>
- Date: Tue, 14 Dec 2004 11:35:43 -0500
Can't you just run the server on a port other than 80, ie a
non-prbilieged port? What if the user has Apache turned on? If you
give the user a webloc that includes your port to click on then if
should be pretty transparent to them.
The other thing is I'm not sure your apple script will work all the
time. Doesn't it prompt for the root password if it hasn't been
invoked in a while? You could try a small cocoa app that uses the
authentication framework to run your java app. But in general I'd be
spooked if I was asked to enter my admin password to run what looks
like a home appliance controller type thing.
Later,
Guy
On Mon, 13 Dec 2004 21:00:03 -0800, William C. McCain
<email@hidden> wrote:
> Is there a property in Info.plist that I can set to give my Java
> application, packaged as a .app bundle, the superuser privilege? Or
> some other simple way to run a Java app with superuser privileges?
>
> My application exposes a small, low-function, secure HTTP server (this
> is not the main function of my application, but it is needed to support
> a master/remote interface between machines on a local area network in a
> user's home). This requires superuser privileges.
>
> It works fine in a shell when I prefix my application with "sudo". But
> I can't ask users to do that! I have also been able to get it to work
> from an AppleScript (something like 'do shell script "sudo open
> MyApp"'). That will be what I will have to ship, unless there is a
> better, more "transparent" solution.
>
> Any ideas?
>
> Bill
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden