8

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?

1 Answer 1

8

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .