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

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, 2015 at 4:28
  • yepp, mplayer was removed :D found the problem :D lol
    – user90825
    Mar 1, 2015 at 11:58

2 Answers 2


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."


It turns out mplayer was removed from the machine.

You must log in to answer this question.