ssh and sudo

Arnaud G lepelerin2002 at yahoo.com
Wed Nov 17 02:37:27 UTC 2010


On Tue, Nov 16, 2010 at 5:28 PM, Arnaud G <lepelerin2002 at yahoo.com> wrote:

> Hi,
>
> Here is what I would like to do in my environment
>
> env: all machines running Ubuntu 10.04 LTS.
> all machines running openssh-server and openssh-client
>
> User "A" on machine "a" and user "B" on machine "b", user "C" on machine "c"
> and so forth ...
>
> First I want to be able to ssh to "b" from "a" without the remote ("B") user
> password. So login as "B" on "b" from "a" with "A".
> I was successful setting that up following these instructions:
>
> http://linuxproblem.org/art_9.html
>
> Now what I want to do is to use sudo on "b" as "B" with "A" 's password or
> no password. I would prefer to use my ssh key for that.
>
> Setting up the sudoers file with the NOPASSWD option is not an option. I
> want user "B" to keep her sudo password.
>
> I have been trying many things I could find on the web, but to no
> availability.
> Every time I try to sudo on "b", it asks for "B" 's password.
>
> Any chance that it can be done. If yes could you point me in the right
> direction.
>
> But first is it the best way to do it.
> Thank you in advance for sharing your knowledge.
>

From: Mark <mhullrich at gmail.com>
To: "Ubuntu user technical support, not for general discussions" 
<ubuntu-users at lists.ubuntu.com>
Sent: Tue, November 16, 2010 9:39:29 PM
Subject: Re: ssh and sudo
Despite your relatively clear description of what you are doing and
want to do, I'm still a little confused by this statement:

> Every time I try to sudo on "b", it asks for "B" 's password.

>What user is the "I" trying to sudo on "b" from where as what user?

Sorry for not being clear. the "I" user is user "A". When "A" is connected to 
"b" as "B" and try to run sudo "command" on "b" ... it asks for "B" 's password.

>When you use sudo to run a command, you have to input your password,
>not someone else's.  Does that help or am I not understanding the
>situation/question?

That what I thought. But if "B" types "A" 's password it does not work (Sorry, 
try again). It needs "B" 's password to work. So the password being asked here 
is "B" 's password. I can test at the moment because I know "B" 's password.

Hope it clarifies the situation.

Tx for your input



-- 
ubuntu-users mailing list
ubuntu-users at lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20101116/ee7f39f1/attachment.html>


More information about the ubuntu-users mailing list