Off-Topic > Off-Topic - Tiny Tux's Corner
[SOLVED] Require password for sudo command ?
remus:
Hi all,
I'm looking into making my mc server a bit more secure, am and wondering if I can make the sudo command trigger a root password request ?
Thanks.
althalus:
Set up a password for the tc user (type passwd)
type
--- Code: ---sudo visudo
--- End code ---
Look for the following line:
--- Code: ---tc ALL=NOPASSWD: ALL
--- End code ---
Change it to:
--- Code: ---tc ALL=(ALL) ALL
--- End code ---
Make sure you add /etc/shadow and /etc/sudoers to your backup. /etc/group might be needed in your backup too, but I don't think it's necessary.
Whatever you do, don't manually edit /etc/sudoers. Visudo protects you somewhat against typos and errors in your sudoers file.
remus:
Thanks althalus
Your instructions are spot on :)
Lee:
Not withstanding any syntax checks that it performs, does visudo actually -do- anything other than sudo some-other-editor would do?
I find that I'm more likely to foul something up due using anything "vi"-related than due to any obscure file syntax. And the sudoers syntax doesn't look all that complex anyhow.
gerald_clark:
Then set your VISUAL or EDITOR variable to whatever editor you prefer.
Navigation
[0] Message Index
[#] Next page
Go to full version