Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

can anybody tell me in which case the sudo host definition is useful?

I mean this part of a line in the sudoers file:

bob host1 = NOPASSWD: reboot

In which environment (except sudo via LDAP) do I need to define the host on which a user can run the specified command?

share|improve this question

1 Answer 1

Here are some things I can think of:-

  • You deploy sudoers via a central source using some configuration management system.
  • The file exists on an NFS share mounted by multiple hosts.
  • A particular system uses many UTS namespaces (different containers have different hostnames)
  • You may intend a particular set of permissions on a particular hostname (which represents a role of a system such as a webserver). But you later change the hostname as it changes roles, this removes sudo capabilities for users with a hostname listed.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.