Bugzilla – Bug 757
Short hostnames no longer work in sudoers file with fqdn true
Last modified: 2016-09-20 15:16:10 MDT
Sometime between 1.8.10 and 1.8.15, short hostnames stopped working in the sudoers file when the 'fqdn' option is true (as it is by default). The documentation indicates that the short form should still work with the fqdn option set. Someone else reported this to Ubuntu as bug #1591137, https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1591137 Steps to reproduce: On a system called 'foobar.example.com', put the following into sudoers: test foobar=(root) /bin/true test foobar.umnh.utah.edu=(root) /bin/false Expected outcome: sudo -l shows user 'test' is allowed to run: (root) /bin/true (root) /bin/false Actual outcome: sudo -l shows user 'test' is allowed to run: (root) /bin/false sudo -l -U test -h foobar shows user 'test' is allowed to run: (root) /bin/false sudo -l -U test -h foobar.example.com shows user 'test' is allowed to run: (root) /bin/true (root) /bin/false
Correction to test case: sudoers should be test foobar=(root) /bin/true test foobar.example.com=(root) /bin/true
Fixed by https://www.sudo.ws/repos/sudo/rev/605c03afc80f
Fixed in sudo 1.8.18