You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by jantje <ja...@skynet.be> on 2008/07/07 16:07:04 UTC
Perform task as the root user
Hi,
Is it possible to perform a tast as the root user? (On a linux system?)
--
View this message in context: http://www.nabble.com/Perform-task-as-the-root-user-tp18317538p18317538.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Perform task as the root user
Posted by "Scot P. Floess" <fl...@mindspring.com>.
Yes - you can do this... Just need to make sure you root environment has
the appropriate environment set up - ant and java for example.
But as always, be careful what you do as root :)
On Mon, 7 Jul 2008, jantje wrote:
>
> Hi,
>
> Is it possible to perform a tast as the root user? (On a linux system?)
> --
> View this message in context: http://www.nabble.com/Perform-task-as-the-root-user-tp18317538p18317538.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
Architect Keros http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Perform task as the root user
Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
>From the error message...
Action: Check that the appropriate optional JAR exists in
-/usr/local/apache-ant/bootstrap/lib
-/home/afstudeerwerk/.ant/lib
-a directory added on the command line with the -lib
argument
-Rob A
-----Original Message-----
From: jantje [mailto:janvanoppen@skynet.be]
Sent: Monday, July 07, 2008 10:16 AM
To: user@ant.apache.org
Subject: RE: Perform task as the root user
Yes, use sudo, and then perform something..
So far I have found this solution:
<sshexec host="localhost" username="root"
password="864ute"
classpath="/home/afstudeerwerk/project/jsch-0.1.39.jar"
command="/usr/bin/tgz2lzm ${softwaredir}/@{package}.tgz
/tmp/iso/slax/modules/@{package}.lzm;"/>
</sequential>
But I have problems, ant does not accept this: jsch-0.1.39.jar
I get this error, and follow these instructions.. But the error keeps on
coming :-(
/home/afstudeerwerk/project/build.xml:191: Problem: failed to
create
task or type sshexec
Cause: the class
org.apache.tools.ant.taskdefs.optional.ssh.SSHExec
was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-/usr/local/apache-ant/bootstrap/lib
-/home/afstudeerwerk/.ant/lib
-a directory added on the command line with the -lib
argument
Can someone help me please? Thanks..
Anderson, Rob (Global Trade) wrote:
>
> You probably want to use the exec task to run the sudo command.
>
> -Rob A
>
> -----Original Message-----
> From: jantje [mailto:janvanoppen@skynet.be]
> Sent: Monday, July 07, 2008 7:07 AM
> To: user@ant.apache.org
> Subject: Perform task as the root user
>
>
> Hi,
>
> Is it possible to perform a tast as the root user? (On a linux
system?)
> --
> View this message in context:
>
http://www.nabble.com/Perform-task-as-the-root-user-tp18317538p18317538.
> html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
--
View this message in context:
http://www.nabble.com/Perform-task-as-the-root-user-tp18317538p18321789.
html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Perform task as the root user
Posted by jantje <ja...@skynet.be>.
Yes, use sudo, and then perform something..
So far I have found this solution:
<sshexec host="localhost" username="root"
password="864ute"
classpath="/home/afstudeerwerk/project/jsch-0.1.39.jar"
command="/usr/bin/tgz2lzm ${softwaredir}/@{package}.tgz
/tmp/iso/slax/modules/@{package}.lzm;"/>
</sequential>
But I have problems, ant does not accept this: jsch-0.1.39.jar
I get this error, and follow these instructions.. But the error keeps on
coming :-(
/home/afstudeerwerk/project/build.xml:191: Problem: failed to create
task or type sshexec
Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.SSHExec
was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-/usr/local/apache-ant/bootstrap/lib
-/home/afstudeerwerk/.ant/lib
-a directory added on the command line with the -lib argument
Can someone help me please? Thanks..
Anderson, Rob (Global Trade) wrote:
>
> You probably want to use the exec task to run the sudo command.
>
> -Rob A
>
> -----Original Message-----
> From: jantje [mailto:janvanoppen@skynet.be]
> Sent: Monday, July 07, 2008 7:07 AM
> To: user@ant.apache.org
> Subject: Perform task as the root user
>
>
> Hi,
>
> Is it possible to perform a tast as the root user? (On a linux system?)
> --
> View this message in context:
> http://www.nabble.com/Perform-task-as-the-root-user-tp18317538p18317538.
> html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
--
View this message in context: http://www.nabble.com/Perform-task-as-the-root-user-tp18317538p18321789.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Perform task as the root user
Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
You probably want to use the exec task to run the sudo command.
-Rob A
-----Original Message-----
From: jantje [mailto:janvanoppen@skynet.be]
Sent: Monday, July 07, 2008 7:07 AM
To: user@ant.apache.org
Subject: Perform task as the root user
Hi,
Is it possible to perform a tast as the root user? (On a linux system?)
--
View this message in context:
http://www.nabble.com/Perform-task-as-the-root-user-tp18317538p18317538.
html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org