Sudo () cloth does not match env.password
I'm trying to prefill
, but the remote throws away some weirdness. Let's say that I am trying to
root a file as testuser with 600 file permissions. I call
and get this back:
[out: cat: /home/testuser/test.txt: Permission denied [ ] out: Fatal error: sudo() received nonzero return code 1 while executing! Requested: cat /home/testuser/test.txt Executed: sudo -S -p 'sudo password:' -u "testuser" /bin/bash -l -c "cat /home/testuser/test.txt"] sudo: cat /home/testuser/test.txt [ ]
Is this request back to login? I tried using
to see if there was a pseudo-terminal issue, but to no avail.
Here's the weird part: calling
run('sudo cat /home/testuser/test.txt')
returning a password prompt from the remote computer and when the password is entered everything works fine.
Naturally, the launch
ssh -t testuser@testserver 'sudo cat /home/user/test.txt'
asks for a password and correctly returns the contents of the file. I have a problem with my server shell configuration, or a problem with how I use it
Down the line, I'll probably set up a deployment user with no password
and limited commands. This will probably cause a problem, but I would like to consider this option if possible. I am using Ubuntu 14.10 VPS if needed.
source to share