Perform task as the root user

View: New views
5 Messages — Rating Filter:   Alert me  

Perform task as the root user

by jantje :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Is it possible to perform a tast as the root user? (On a linux system?)

Re: Perform task as the root user

by Scot P. Floess :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
> For additional commands, e-mail: user-help@...
>
>

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@...
For additional commands, e-mail: user-help@...


RE: Perform task as the root user

by Anderson, Rob (Global Trade) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You probably want to use the exec task to run the sudo command.

-Rob A

-----Original Message-----
From: jantje [mailto:janvanoppen@...]
Sent: Monday, July 07, 2008 7:07 AM
To: user@...
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@...
For additional commands, e-mail: user-help@...


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


RE: Perform task as the root user

by jantje :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

RE: Perform task as the root user

by Anderson, Rob (Global Trade) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...]
Sent: Monday, July 07, 2008 10:16 AM
To: user@...
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@...]
> Sent: Monday, July 07, 2008 7:07 AM
> To: user@...
> 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@...
> For additional commands, e-mail: user-help@...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>

--
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@...
For additional commands, e-mail: user-help@...


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