Comment 30 for bug 32906

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 32906] Re: sudo shouldn’t ABSOLUTELY NEED to look up the host it’s running on

Dorin Lazăr [2008-03-20 7:44 -0000]:
> Going back to this bug: this happened to me when I upgraded to one
> of the alphas of ubuntu. However, instead of seeing only the problem
> in the network settings, I want to point the design mistake in sudo.
> What would've happened if my hostname was actually other machine's?
> does that mean that I could've sudo stuff on other machine even if
> the local policy disallowed it?

If you configure your local sudoers in a way that you have privileges
on a machine 'foo', and no privs on a machine 'bar', and you change
your hostname from 'bar' to 'foo', then yes, you'll get privileges.
That's exactly what host-based sudo configuration is meant to do.
(This is not the default, but it's convenient for sharing sudo
configuration amongst multiple machines).