FS#15009 - [sudo] localhost in sudoers
Attached to Project:
Arch Linux
Opened by Vasyl Demin (zersaa) - Monday, 08 June 2009, 20:17 GMT
Last edited by Allan McRae (Allan) - Tuesday, 09 June 2009, 02:38 GMT
Opened by Vasyl Demin (zersaa) - Monday, 08 June 2009, 20:17 GMT
Last edited by Allan McRae (Allan) - Tuesday, 09 June 2009, 02:38 GMT
|
Details
Description:
If I put my computers name in sudoers a command runs successfully. If I put localhost I'm prompted for a password. Additional info: sudo 1.7.1-1 In /etc/rc.conf: HOSTNAME="computername" In /etc/hosts: 127.0.0.1 localhost.localdomain localhost computername Steps to reproduce: In /etc/sudoers: %users computername = NOPASSWD: /sbin/reboot $sudo reboot ..rebooting.. In /etc/sudoers: %users localhost = NOPASSWD: /sbin/reboot $sudo reboot Password: |
This task depends upon
Closed by Allan McRae (Allan)
Tuesday, 09 June 2009, 02:38 GMT
Reason for closing: Not a bug
Additional comments about closing: There are configuration options to allow you to do this
Tuesday, 09 June 2009, 02:38 GMT
Reason for closing: Not a bug
Additional comments about closing: There are configuration options to allow you to do this
Comment by Jan de Groot (JGC) -
Monday, 08 June 2009, 23:04 GMT
unless you enable fqdn in sudoers, sudo will use the output of
hostname to get your hostname, so localhost will never match this
way. I don't see the need to add localhost here though, as if it
worked, it would mean the same as allowing all users to reboot on
every machine.