I would like my AA1 to ask for a password when I try to execute a command with sudo. Has anyone else done this? How to do it?
I think I already have the solution, but I'm afraid to test it. As I understand it, you can edit this behaviour by editing the file /etc/sudoers. The important part is:
From /etc/group I see that "wheel" is a group that has "root" and "user" in it. I figure the safest way would be to make the nopasswd -rule affect only root user, instead of the wheel group. So the code should be changed to:
This way the change won't affect the root user (which I figure shoudn't be messed with). Am I correct in this? Has anyone else done this? Will this break my system and make it impossible to change the file back? Or is there a better way achieve what I want? I would try this myself of course, but I'll first have to make sure my system backup works, and that's a bigger process...
I think I already have the solution, but I'm afraid to test it. As I understand it, you can edit this behaviour by editing the file /etc/sudoers. The important part is:
Code:
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL
From /etc/group I see that "wheel" is a group that has "root" and "user" in it. I figure the safest way would be to make the nopasswd -rule affect only root user, instead of the wheel group. So the code should be changed to:
Code:
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
## Same thing without a password
%root ALL=(ALL) NOPASSWD: ALL
This way the change won't affect the root user (which I figure shoudn't be messed with). Am I correct in this? Has anyone else done this? Will this break my system and make it impossible to change the file back? Or is there a better way achieve what I want? I would try this myself of course, but I'll first have to make sure my system backup works, and that's a bigger process...