Bugzilla – Bug 580
Incorrect unused host error message.
Last modified: 2013-08-17 06:36:02 MDT
Getting an incorrect error for unused host if host is defined but is only referenced for a defaults setting. Use visudo on the below sudoers content: Host_Alias SOMEHOST = somehost, somehost.atsomedomain.com Host_Alias SUDO_AUDIT_HOSTS = SOMEHOST Defaults@SUDO_AUDIT_HOSTS log_year, logfile=/var/log/sudo_audit.log You'll get the following error on 1.8.6p3 on LINUX RHEL 4: visudo: Warning: unused Host_Alias SOMEHOST It seems to happen on other versions too, like RHEL 6 with sudoers 1.7.4p5. In my opinion I think you should be able to set a default for hosts even if nothing else is referenced for them in the sudoers file. I believe this to be a bug for visudo to complain about it. I think this kind of strategy is common with people who have a global sudoers file that's checked in and out of source control to manage their enterprise with one sudoers file--makes auditing easier.
This is already fixed in sudo trunk. The fix will be present in sudo 1.8.7.
Fixed in sudo 1.8.7.