<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Serious Sudo Help! in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271902#M52906</link>
    <description>Alzhy, Thank you for the help. I know, I didn't realize I was using the command sudo -u, being the user as tester. Without the option "u" it worked.&lt;BR /&gt;&lt;BR /&gt;Thank you, again.</description>
    <pubDate>Tue, 01 Feb 2011 17:08:43 GMT</pubDate>
    <dc:creator>Qcheck</dc:creator>
    <dc:date>2011-02-01T17:08:43Z</dc:date>
    <item>
      <title>Serious Sudo Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271898#M52902</link>
      <description>On linux 5.4, I would like to setup the sudo for the user, so that user can restart the ntpd. I did setup as follows:&lt;BR /&gt;&lt;BR /&gt;# visudo&lt;BR /&gt;Host_Alias     LINUXHELP = test_server&lt;BR /&gt;User_Alias USERS = tester&lt;BR /&gt;Cmnd_Alias SERVICES = /etc/init.d/ntpd restart&lt;BR /&gt;&lt;BR /&gt;USERS LINUXHELP = SERVICES&lt;BR /&gt;&lt;BR /&gt;-----------------------------------------------&lt;BR /&gt;Saved the above and tried to login to the node as the user. And ran the following, however errored out:&lt;BR /&gt;&lt;BR /&gt;[Test_Server: /home/tester]# sudo -u tester'/etc/init.d/ntpd restart'&lt;BR /&gt;tester is not allowed to run sudo on test_server.  This incident will be reported.&lt;BR /&gt;&lt;BR /&gt;-----------------------------------------------&lt;BR /&gt;The /var/log/secure file reports the following:&lt;BR /&gt;&lt;BR /&gt;Jan 28 10:55:17 test_server sudo: tester: user NOT authorized on host ; TTY=pts/2 ; PWD=/home/tester ; USER=tester; COMMAND=/etc/init.d/ntpd restart&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;+++++++++++++++++++++++++++++++++++++++++&lt;BR /&gt;&lt;BR /&gt;Please help me to fix. I did this before, and not sure hy it is not working. What am I doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thank you in an advance!</description>
      <pubDate>Fri, 28 Jan 2011 16:01:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271898#M52902</guid>
      <dc:creator>Qcheck</dc:creator>
      <dc:date>2011-01-28T16:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Serious Sudo Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271899#M52903</link>
      <description># sudo -u tester'/etc/init.d/ntpd restart'&lt;BR /&gt;&lt;BR /&gt;Based on a quick bit of testing on RHEL 5.5, &lt;BR /&gt;sudo seems to regard the quoted and unquoted versions as two different commands. Try without the quotes:&lt;BR /&gt;&lt;BR /&gt;# sudo -u tester /etc/init.d/ntpd restart&lt;BR /&gt;&lt;BR /&gt;If that does not work either, please run "sudo -l" as user "tester". If it does not list "/etc/init.d/ntpd restart" as an allowed command, it might be a hostname lookup mismatch. The hostname (or Host_alias) must exactly match the output of the "hostname" command.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Fri, 28 Jan 2011 16:57:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271899#M52903</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-01-28T16:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Serious Sudo Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271900#M52904</link>
      <description>MK, Thank you for the response. However, still doesn't work. Please find the following:&lt;BR /&gt;&lt;BR /&gt;[test_server: /home/tester]# sudo -l&lt;BR /&gt;[sudo] password for tester:&lt;BR /&gt;&lt;BR /&gt;User tester may run the following commands on this host:&lt;BR /&gt;    (root) /etc/init.d/ntpd restart&lt;BR /&gt;[test_server: /home/tester]# sudo -u tester /etc/init.d/ntpd restart&lt;BR /&gt;Sorry, user tester is not allowed to execute '/etc/init.d/ntpd restart' as tester on test_server.&lt;BR /&gt;[test_server: /home/teser]# hostname&lt;BR /&gt;tester&lt;BR /&gt;[test_server: /home/tester]#&lt;BR /&gt;&lt;BR /&gt;Please guide.&lt;BR /&gt;&lt;BR /&gt;Thank you.</description>
      <pubDate>Mon, 31 Jan 2011 20:23:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271900#M52904</guid>
      <dc:creator>Qcheck</dc:creator>
      <dc:date>2011-01-31T20:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Serious Sudo Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271901#M52905</link>
      <description>User tester may run the following commands on this host:&lt;BR /&gt;(root) /etc/init.d/ntpd restart&lt;BR /&gt;&lt;BR /&gt;Your SUDO rights means user tester is allowed to run that command with "root" priviliges.&lt;BR /&gt;&lt;BR /&gt;So:&lt;BR /&gt;&lt;BR /&gt;tester% sudo /etc/init.d/ntpd restart&lt;BR /&gt;&lt;BR /&gt;should do it. It will however prompt for tester's password.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jan 2011 21:21:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271901#M52905</guid>
      <dc:creator>Zinky</dc:creator>
      <dc:date>2011-01-31T21:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Serious Sudo Help!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271902#M52906</link>
      <description>Alzhy, Thank you for the help. I know, I didn't realize I was using the command sudo -u, being the user as tester. Without the option "u" it worked.&lt;BR /&gt;&lt;BR /&gt;Thank you, again.</description>
      <pubDate>Tue, 01 Feb 2011 17:08:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/serious-sudo-help/m-p/5271902#M52906</guid>
      <dc:creator>Qcheck</dc:creator>
      <dc:date>2011-02-01T17:08:43Z</dc:date>
    </item>
  </channel>
</rss>

