Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
SUDO Problem
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
partydrone  
View profile   Translate to Translated (View Original)
 More options 30 Oct, 20:32
From: partydrone <partydr...@gmail.com>
Date: Fri, 30 Oct 2009 13:32:42 -0700 (PDT)
Local: Fri 30 Oct 2009 20:32
Subject: SUDO Problem
When trying to deploy to a new staging server, I get the following
error:

sudo: no tty present and no askpass program specified

Anyone know what's up with this and how do I fix it?

Thanks!


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Hambley  
View profile   Translate to Translated (View Original)
 More options 30 Oct, 23:09
From: Lee Hambley <lee.hamb...@gmail.com>
Date: Sat, 31 Oct 2009 00:09:36 +0100
Local: Fri 30 Oct 2009 23:09
Subject: Re: [capistrano] SUDO Problem

You do not have a tty (you are therefore using a pty) -- and you do not have
passwordless sudo access configured.

You can alter capistrano's configuration to use the other (a tty, or a pty,
whichever your configuration requires)

-- Lee Hambley

Twitter: @leehambley | @capistranorb


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Bailey  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 10:16
From: Mike Bailey <m...@bailey.net.au>
Date: Sat, 31 Oct 2009 03:16:37 -0700 (PDT)
Local: Sat 31 Oct 2009 10:16
Subject: Re: SUDO Problem
I just bit by the same problem connecting to Ubuntu 9.10 (Karmic
Koala).

I think this is going to affect all Capistrano users who use sudo in
recipes.

Capistrano supports sudo with passwords and ubuntu has always granted
a pty when you ssh to it.

Any idea what may have changed in last weeks release of Ubuntu?

- Mike

On Oct 31, 10:09 am, Lee Hambley <lee.hamb...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Hambley  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 10:31
From: Lee Hambley <lee.hamb...@gmail.com>
Date: Sat, 31 Oct 2009 11:31:26 +0100
Local: Sat 31 Oct 2009 10:31
Subject: Re: [capistrano] Re: SUDO Problem

No Mike, but I'd love to know, if you come across any evidence, I'd really
appreciated if you shared it on here; we've been saying for a long time that
using sudo during deployment encourages insecure/unsafe setups (and of
course, means that we're making assumptions that don't apply to a /lot/ of
people on shared hosting.. so this may yet change)

-- Lee Hambley

Twitter: @leehambley | @capistranorb


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Bailey  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 12:26
From: Mike Bailey <m...@bailey.net.au>
Date: Sat, 31 Oct 2009 23:26:08 +1100
Local: Sat 31 Oct 2009 12:26
Subject: Re: [capistrano] Re: SUDO Problem

sudo is necessary in some circumstances (such as creating a user or
installing a package)

I've been having a look into this and found that the password prompt for
sudo doesn't seem to be working on a host I've been using since 2006.

maculike:~ mbailey$ cap test_sudo HOSTS=sh01
    triggering load callbacks
  * executing `deprec:connect_canonical_tasks'
  * executing `test_sudo'
  * executing "sudo hostname"
    servers: ["sh01"]
    [sh01] executing command
*** [err :: sh01] Password:
my_password

Has something changed in Capistrano that broke entering my sudo password?
I'm using capistrano-2.5.9

- Mike


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Hambley  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 13:21
From: Lee Hambley <lee.hamb...@gmail.com>
Date: Sat, 31 Oct 2009 14:21:56 +0100
Local: Sat 31 Oct 2009 13:21
Subject: Re: [capistrano] Re: SUDO Problem

Nothing changed Mike, but passworded sudo access isn't supported officially,
because it's so damned difficult to get right across multiple platforms.

-- Lee Hambley

Twitter: @leehambley | @capistranorb
Blog: http://lee.hambley.name/
Working with Rails: http://is.gd/1s5W1

2009/10/31 Mike Bailey <m...@bailey.net.au>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Bailey  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 13:51
From: Mike Bailey <m...@bailey.net.au>
Date: Sun, 1 Nov 2009 00:51:24 +1100
Local: Sat 31 Oct 2009 13:51
Subject: Re: [capistrano] Re: SUDO Problem

The following error appears when Capistrano attempts to use sudo with a
password on Ubuntu 9.10 "Karmic Koala":

sudo: no tty present and no askpass program specified

This can be solved by setting the following variable:

default_run_options[:pty] = true

You can do this in your ~/.caprc file, /etc/capistrano.conf, ./Capfile, or
deploy.rb

http://weblog.jamisbuck.org/2007/10/14/capistrano-2-1

Thanks to Lee for pointing this out

- Mike


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Bailey  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 13:56
From: Mike Bailey <m...@bailey.net.au>
Date: Sun, 1 Nov 2009 00:56:32 +1100
Local: Sat 31 Oct 2009 13:56
Subject: Re: [capistrano] Re: SUDO Problem

On Sun, Nov 1, 2009 at 12:21 AM, Lee Hambley <lee.hamb...@gmail.com> wrote:
> Nothing changed Mike, but passworded sudo access isn't supported
> officially, because it's so damned difficult to get right across multiple
> platforms.

I thought we solved it a while ago by using #{sudo} in commands:

run "#{sudo} hostname"

instead of:

run "sudo hostname"

What platform does it not work on?

This is actually why my test task failed on the server from 2006. I was
tired and forgot to use #{sudo}. :-)

- Mike


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Hambley  
View profile   Translate to Translated (View Original)
 More options 31 Oct, 14:20
From: Lee Hambley <lee.hamb...@gmail.com>
Date: Sat, 31 Oct 2009 15:20:18 +0100
Local: Sat 31 Oct 2009 14:20
Subject: Re: [capistrano] Re: SUDO Problem

Mike,

Sure, it's supposed to be like the way you just explained it - glad we
didn't break anything for you :-D

-- Lee Hambley

Twitter: @leehambley | @capistranorb


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
leo  
View profile   Translate to Translated (View Original)
 More options 14 Nov, 20:42
From: leo <lsternli...@gmail.com>
Date: Sat, 14 Nov 2009 12:42:22 -0800 (PST)
Local: Sat 14 Nov 2009 20:42
Subject: Re: SUDO Problem
Thanks a lot Mike, this helped a lot!

On Oct 31, 8:51 am, Mike Bailey <m...@bailey.net.au> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google