I have a fabric deployment script which uses sudo heavily. It runs about 20 commands using sudo without any problems and then choke on the last two commands:
ln -sf /path/a /path/b chown -R someuser:somegroup /path/a
When my script tries to run one of these commands, I get the sudo password prompt (even though the script already used sudo about 20 times just before without asking for it).
Now if I ssh to the server and type the command with sudo, I get the same result. It prompts me for the my password. The problem is that it never accept it.
So if I type sudo with any other commands it works. But with these two commands it keeps asking me for my password and refuse it saying "Sorry, try again.". However if I log in as root with su and type the same command it works.
So the password is correct and sudo works (except for those two commands) and this is not related to fabric .. I'm out of ideas.
My sudoers conf looks like this:
root ALL=(ALL) ALL myuser ALL=(ALL) ALL
I don't know where to look anymore.