1
USER@notebook:~/foo/notebook$ sudo /usr/bin/mplayer /home/USER/foo/notebook/something.mp3
[sudo] password for USER: 
USER@notebook:~/foo/notebook$ 

USER ALL=(ALL) NOPASSWD: /usr/bin/mplayer /home/USER/foo/notebook/something.mp3

Question: sudo didn't ask for a password. Now it asks.. Why? The sudo package and the sudoers file wasn't updated, the USER's pwd isn't expired.

Playing an mp3 via ssh and sudo is needed because it doesn't play the sound without it, strange..

I'm using Ubuntu 12.04.

  • Well if it wasn't happenning before but now it happens, then something changed. Was there an update, even if it didn't touch the sudo binary or sudoers file? – Shelvacu Mar 1 '15 at 4:28
  • yepp, mplayer was removed :D found the problem :D lol – user90825 Mar 1 '15 at 11:58
1

The sudoers file is sensitive to the order of entries within it. The NOPASSWD entry must come after any other entries matching your user to take precedence.

The rule is, "last match wins."

1

It turns out mplayer was removed from the machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy