Re: ant and sudo

2008-11-12 Thread Steve Loughran
Hendrik Maryns wrote: Steve Loughran schreef: 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 command with the relevant (property driven) password, How would I do that? I need something similar for . Right now I use a plain p

Re: ant and sudo

2008-11-12 Thread Hendrik Maryns
Steve Loughran schreef: > 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 command with the relevant > (property driven) password, How would I do that? I need something similar for . Right now I use a plain password in the task,

Re: ant and sudo

2008-11-12 Thread Steve Loughran
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 /> it works, but only if

ant and sudo

2008-11-12 Thread Tom Robinson
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 > it works, but only if I've entered my p

Re: sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-29 Thread mindspin311
ED]> > >> Not sure, but maybe this will help You: >> >> >> http://www.nabble.com/sshexec-%28running-remote-commands-with-sudo%29-forced-psuedo-tty-allocation-tp18592216p18641500.html >

Re: sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-25 Thread Krzysieq
Forgot to close the double quote at the end of arg line... 2008/7/25 Krzysieq <[EMAIL PROTECTED]> > Not sure, but maybe this will help You: > > > http://www.nabble.com/sshexec-%28running-remote-commands-with-sudo%29-forced-psuedo-tty-allocation-tp18592216p18641500.html &g

Re: sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-25 Thread Krzysieq
Not sure, but maybe this will help You: http://www.nabble.com/sshexec-%28running-remote-commands-with-sudo%29-forced-psuedo-tty-allocation-tp18592216p18641500.html > Sent from the Ant - Users mailing list archive at Nabble.

RE: sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-24 Thread mindspin311
meh.. I give up. ssh'in into root by adding build's pub key to root's authorized_keys' file. Systems might have some problems with it, but it works for now. -- View this message in context: http://www.nabble.com/sshexec-%28running-remote-commands-with-sudo%29-forced-p

RE: sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-23 Thread mindspin311
) I've also tried to use antRunAsync the way it was meant for (using ant exec to no avail) /usr/local/bin/RestartApache is just a script with: sudo /sbin/service httpd restart still getting a tty error for using sudo in RestartApache Barry Pape wrote: > > I'm using it in a

RE: sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-23 Thread Barry Pape
nning remote commands with sudo) forced psuedo-tty allocation I tried that to no avail. I got this as my build script: antRunAsync I copied the way it was. and TestCommand is: #!/bin/sh ssh -t [EMAIL PROTECTED] sudo /sbin/services httpd restart Not sure what&#x

RE: sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-22 Thread mindspin311
I tried that to no avail. I got this as my build script: antRunAsync I copied the way it was. and TestCommand is: #!/bin/sh ssh -t [EMAIL PROTECTED] sudo /sbin/services httpd restart Not sure what's wrong here.. I tried with nohup set to true and false a

RE: sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-22 Thread Barry Pape
To: user@ant.apache.org Subject: RE: sshexec (running remote commands with sudo) forced psuedo-tty allocation [exec] Pseudo-terminal will not be allocated because stdin is not a terminal. Doesn't work. Tried it to run a remote command without -t for something like 'ls' and it works fine. It

RE: sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-22 Thread mindspin311
ne. ruel loehr wrote: > > why can't you just do an exec with the command ssh -t .? > > -Original Message- > From: mindspin311 [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 22, 2008 10:37 AM > To: user@ant.apache.org > Subject: sshexec

RE: sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-22 Thread Loehr, Ruel
why can't you just do an exec with the command ssh -t .? -Original Message- From: mindspin311 [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 22, 2008 10:37 AM To: user@ant.apache.org Subject: sshexec (running remote commands with sudo) forced psuedo-tty allocation I'm

sshexec (running remote commands with sudo) forced psuedo-tty allocation

2008-07-22 Thread mindspin311
I'm trying to mimic this command in ant: [EMAIL PROTECTED]ssh -t [EMAIL PROTECTED] sudo /sbin/service httpd restart build has password-less ssh access to deploy's accounts. Deploy also has password-less sudoers access to run any root owned apps. This is the only way I can do th

Re: sudo permissions with scp

2008-04-02 Thread Krzysieq
I've played around with sudo in something more or less similar. You might want to execute something like bash -c "sudo your_stuff" rather than the command itself. Don't want to discourage You, but in the end I dropped the scp task and started doing a simple exec with an ssh

sudo permissions with scp

2008-04-01 Thread mindspin311
I'm using scp to transfer a file to a server. I need to gain access of the user deploy in order to to this (sudo su deploy) Is there a way to do this inside the scp task? I currently had to ask a systems guy at my work to give me temp permissions to use deploy under my current name, bu

Re: Sudo

2006-05-25 Thread Robert Koberg
Hi, (I might have missed this suggestion) Why not just put a script or ant build on the remote machine? Then call that from Ant using sshexec. best, -Rob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

RE: Sudo

2006-05-25 Thread saket
Ventakesh, If you are trying to do ssh on a remote machine and then execute some commands on a remote machine. Better try it using public private keys. Also do one more thing, become a sudo user and then generate the keys if you want to execute a command using sudo user. -Saket

RE: Sudo

2006-05-25 Thread Anderson, Rob (Global Trade)
You can configure sudo to allow you to run commands without entering a password. This is probably your best option. See the sudo documentation for details. -Rob Anderson > -Original Message- > From: Res Pons [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 23, 2006 9:22 PM &

RE: Sudo

2006-05-23 Thread Res Pons
sers List" To: "Ant Users List" Subject: Sudo Date: Wed, 24 May 2006 08:50:03 +0530 MIME-Version: 1.0 Received: from mail.apache.org ([209.237.227.199]) by bay0-mc6-f17.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 23 May 2006 20:22:49 -0700 Received: (qmail 36133

Sudo

2006-05-23 Thread Venkatesh Vijayakumar04
Hi all How to pass sudo command with password in sshexec. after executing the above command sudo su...it will be prompted for password. I have to give password after this how do I give? How do sshexec command attribute accept password like this... Thanks in

RE: Sshexec task, running commands using 'sudo'

2005-06-15 Thread Anderson, Rob (Global Trade)
Yeah, It's reasonable for the admins to be reluctant with this request. They should be aware that they only need to setup passwordless sudo for the few commands you need to run noninteractively via sshexec. I'm glad to hear you got it worked out. -Rob A > -Original Message--

RE: Sshexec task, running commands using 'sudo'

2005-06-15 Thread S I
Thank you Rob. After I posted yesterday...our unix Admin did finally figured it out and now I can use the ssh task w/o requiring a password. I think they just didn't want to hand-over a passwordless Sudo over to me? Thanks again. :) Original Message Follows From: "And

RE: Sshexec task, running commands using 'sudo'

2005-06-15 Thread Anderson, Rob (Global Trade)
I recall seeing your post that you were not able to use sshexec even after your admin removed the requirement for a password when running sudo for the command you were trying to run. I have had success with this. I am able to use sshexec when sudo is configured to not require a password for the

RE: Sshexec task, running commands using 'sudo'

2005-06-14 Thread S I
bject: RE: Sshexec task, running commands using 'sudo' Date: Tue, 14 Jun 2005 16:39:36 -0700 MIME-Version: 1.0 Received: from mail.apache.org ([209.237.227.199]) by MC8-F3.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 14 Jun 2005 16:34:24 -0700 Received: (qmail 27055 invoked by ui

RE: Sshexec task, running commands using 'sudo'

2005-06-14 Thread Anderson, Rob (Global Trade)
Have your sysadmin configure sudo to not require a password for the command you are trying to run. If this task you fall on you, read the sudo manual for details on how to set that up. -Rob A > -Original Message- > From: Rich Harris [mailto:[EMAIL PROTECTED] > Sent: Tuesday

RE: Sshexec task, running commands using 'sudo'

2005-06-14 Thread Rich Harris
An addendum...I noticed that when running 'sudo' commands manually I get prompted for my password the first time I use it. That may be where it's hanging. The uname/pass auth. only happens upon the initial ssh connect using the sshexec and doesn't carry over through the sessio

Sshexec task, running commands using 'sudo'

2005-06-14 Thread Rich Harris
I'm having an issue where if I need to run 'sudo' before running a command during my ssh session, it just hangs ant until I escape out of ANT. Has anyone else had this problem? I'm open to ideas as to why this is happening or how I can get around it while staying within

RE: How do I execute a sudo ssh command?

2004-11-04 Thread Anderson, Rob (Global Trade)
If there is a security policy in place that prevents you from running sudo commands without a password, then I would suggest changing the policy, rather than going with the option below. Setting the setuid bit is probably more of a securty risk than running a sudo command without a password. Of

RE: How do I execute a sudo ssh command?

2004-11-04 Thread Anderson, Rob (Global Trade)
> > Is that really the only way. I find it hard to believe that > there is no > other way to achieve this. > Unfortunetely it is not possible for me to configure sudo to > allow me to run > commands without entering t

Re: How do I execute a sudo ssh command?

2004-11-03 Thread Alexey N. Solofnenko
: Is that really the only way. I find it hard to believe that there is no other way to achieve this. Unfortunetely it is not possible for me to configure sudo to allow me to run commands without entering the password. col. - To

Re: How do I execute a sudo ssh command?

2004-11-03 Thread Colin Harris
Is that really the only way. I find it hard to believe that there is no other way to achieve this. Unfortunetely it is not possible for me to configure sudo to allow me to run commands without entering the password. col. - Original Message - From: "Anderson, Rob (Global Trade)&quo

RE: How do I execute a sudo ssh command?

2004-10-25 Thread Anderson, Rob (Global Trade)
You would need to configure sudo to allow you to run the command without a password. -Rob A > -Original Message- > From: news [mailto:[EMAIL PROTECTED] Behalf Of Colin Harris > Sent: Sunday, October 24, 2004 9:21 PM > To: [EMAIL PROTECTED] > Subject: How do I execute a s

How do I execute a sudo ssh command?

2004-10-24 Thread Colin Harris
I'm having trouble trying to run a command on a remote server via ssh. The problem is that there are a few commands that require me to use 'sudo' but there doesn't seem to be a way of specifying the password when it is requested. I'm sure other people have had to do the