R
R
Ras2014-11-29 11:51:37
local server
Ras, 2014-11-29 11:51:37

Centos - why don't sudo rules for localhost work?

Greetings!
Because of what could this be?
the following rules do not work:
%groupname localhost=/sbin/shutdown -r now
, but the following rules work:
%groupname fullhostname=/sbin/shutdown -r now
fullhostname - machine name from /etc/hostname
At the same time, localhost is pinged.
OS - Centos 7.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Evseev, 2014-11-30
@Ras

From "man sudo":
Those. you need to write not "localhost", but what the "hostname" command says.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question