1

I edited the sudoers file like below:

myuser         ALL=(ALL)       NOPASSWD: ALL
newuser        ALL=(ALL)       NOPASSWD: ALL

There is no another line that contains "myuser" in sudoers file. But Linux asks password when I try sudo anything for once. It's like that only for myuser. myuser is the first user after installation. If I add a new user and give it sudo privilege as same, it can be root without password but myuser cannot.

The server runs on Azure by the way.

Jo Shepherd
  • 785
  • 5
  • 20
  • 37
  • If you tell me that `When multiple entries match for a user, they are applied in order. Where there are multiple matches, the last match is used (which is not necessarily the most specific match)` cannot explain your specific case, I will reopen the question. – Kamil Maciorowski Dec 31 '19 at 08:35
  • thank you @KamilMaciorowski. I'll check. – Jo Shepherd Dec 31 '19 at 08:40
  • It may also be because of `#include` or `#includedir` which is *not* a comment. Some matching entry may be in another file. – Kamil Maciorowski Dec 31 '19 at 08:41

0 Answers0