[sudo-users] Does sudoers support an if/else logic structure

sean.dolan at lmco.com sean.dolan at lmco.com
Fri Aug 11 07:04:34 MDT 2023


Our network consists of both an in-band and out-of-band network meaning a box can have multiple NICs with either interface or both.    We would like to deploy a *common* sudoers throughout our enterprise and I was hoping to include logic in the sudoers to use an @include directive that includes either the in-band or the out-of-band file which would include a list of log_servers applicable to that interface  (yes, the log_server supports both interfaces).   Is this possible?   I can work around it by alternating the list of log_servers from one interface to the other and include the log_server_timeout to a low value, but it still would result in a "delay" for a machine that only has one interface and the first log_server entry does not match that interface.   Or might there be a better way to achieve the result without if/else logic in sudoers?


More information about the sudo-users mailing list