SSH sudo password problem

albi albi at scii.nl
Fri Oct 14 19:46:20 UTC 2005


On Fri, 14 Oct 2005 15:33:40 -0400
Carthik Sharma <carthik at gmail.com> wrote:

> 2) If I have the same in a shell script called rsync_ssh_push.sh and execute
> it thus:
> $ ./rsync_ssh_push.sh
> 
> I am logged in without being prompted for a password
> 
> However
> 3) If I execute the same script using
> $ sudo ./rsync_ssh_push.sh
> 
> I am repeatedly asked for my (carthik's) password, for each instance of an
> ssh statement in the script! In the script I try to log in to the remote
> server as user carthik, not as user "root" or anything of that sort.
> 
> Any hints as to why $sudo ./rsync_ssh_push.sh behaves differently from $
> ./rsync_ssh_push.sh ?

if you don't use NOPASSWD:ALL in /etc/sudoers it's perfectly normal that
sudo asks for your password (you can use the command visudo to edit it)

see : man sudoers

-- 
grtjs, albi
gpg-key: lynx -dump http://scii.nl/~albi/gpg.asc | gpg --import




More information about the ubuntu-users mailing list