Sudoers file not reflect changes

0

Hi, I used detached the old disk, changed sudoers file and added NOPASSWD: Then reactched to the old instance. When I login from putty, it still ask me for newuser password WHICH I know it and got refused ssying not in sudoers that I added it. I added in sudoers before the last @includedir newuser ALL=(ALL) NOPASSWD:ALL I also tried add it in /etc/sudoers.d And NOPASSWD: for other users, when I tried to swtich to root: su root, it says AUTHENTICATION FAILED.

I checked /etc/passwd and shadow files in the old disk, it's correct: newuser:x:1001:1001:old,1,323,323,user:/home/newuser:/bin/bash newuser:$6$/<redacted>

Please help with this AWS EC2 rediculous problem.

Thanks!

已提問 2 年前檢視次數 399 次
1 個回答
0

It might nott be the cause but sudo will refuse to load any instructions from sudoers file if the syntax is not correct. Double check the syntax or use visudo, this might not be possible in your case as you're editing the file from a non standard path.

theist
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南