ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: ant and sudo
Date Wed, 12 Nov 2008 10:48:46 GMT
Tom Robinson wrote:
> I need to run an "exec" task with superuser privileges but I've run into 
> two problems with two different approaches:
> 
> 1) Running "sudo ant" doesn't give me access to my user environment 
> variables.
> 
> 2) If I do <exec executable = "sudo" ><arg value = "actual_command" 
> /></exec> it works, but only if I've entered my password for sudo 
> recently... I can't enter the password for sudo through ant (I have to 
> hit enter twice, then it says "Sorry, try again", at which point if I 
> enter it again it *sometimes* works).
> 
> Resolving #1 would be ideal, and negate the need for resolving #2. I'm 
> on Mac OS X (Leopard), if that matters.

The way we do root level access is to ssh in to localhost and run stuff 
as root there. you can either set up the <ssh> command with the relevant 
(property driven) password, or set up the ssh keys so that you can ssh 
in to root@localhost using keys alone.

-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message