<?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: Modifying the sudo file in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/modifying-the-sudo-file/m-p/4573761#M60313</link>
    <description>The correct location for your planned line would be "User privilege specification". &lt;BR /&gt;&lt;BR /&gt;The sections in the default sudoers file are just comments: you can probably configure things in any order you want, although if you use aliases, it might be required to _define_ an alias first before _using_ it in a privilege specification.&lt;BR /&gt;&lt;BR /&gt;If you need to authorize a long list of other commands for Nagios, you might wish to use a command alias:&lt;BR /&gt;&lt;BR /&gt;----&lt;BR /&gt;Cmnd_Alias NAGIOSCMDS = /usr/bin/du, /usr/bin/something_else, /usr/sbin/a_third_command, &lt;ETC...&gt;&lt;BR /&gt;&lt;BR /&gt;nagios ALL=(root) NOPASSWD: NAGIOSCMDS&lt;BR /&gt;----&lt;BR /&gt;&lt;BR /&gt;When your sudo configuration becomes more complex, using the aliases allows you to group things so that you can keep the actual privilege specifications short, simple and easy to understand.&lt;BR /&gt;&lt;BR /&gt;But if you need just to authorize one user to run one or two commands, aliases are not necessary.&lt;BR /&gt;&lt;BR /&gt;MK&lt;/ETC...&gt;</description>
    <pubDate>Fri, 29 Jan 2010 07:31:01 GMT</pubDate>
    <dc:creator>Matti_Kurkela</dc:creator>
    <dc:date>2010-01-29T07:31:01Z</dc:date>
    <item>
      <title>Modifying the sudo file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/modifying-the-sudo-file/m-p/4573760#M60312</link>
      <description>Hi there --&lt;BR /&gt;&lt;BR /&gt;I need to modify the sudo file to allow a user account, nagios, the ability to run a particular command, du, as root user. The nagios user on the machine in question is set up with the /sbin/nologin shell. The recommended syntax is the following:&lt;BR /&gt;&lt;BR /&gt;nagios ALL=(root) NOPASSWD: /usr/bin/du&lt;BR /&gt;&lt;BR /&gt;My question is the following, when looking at the sudo file, is there a particular section where the above syntax should be inserted in order for it to work? One section that comes to mind is:&lt;BR /&gt;&lt;BR /&gt;Cmnd alias specification&lt;BR /&gt;&lt;BR /&gt;and another possibility is:&lt;BR /&gt;&lt;BR /&gt;User privilege specification&lt;BR /&gt;&lt;BR /&gt;What would be the best way to go? Thanks.</description>
      <pubDate>Thu, 28 Jan 2010 23:59:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/modifying-the-sudo-file/m-p/4573760#M60312</guid>
      <dc:creator>Andrew Kaplan</dc:creator>
      <dc:date>2010-01-28T23:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying the sudo file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/modifying-the-sudo-file/m-p/4573761#M60313</link>
      <description>The correct location for your planned line would be "User privilege specification". &lt;BR /&gt;&lt;BR /&gt;The sections in the default sudoers file are just comments: you can probably configure things in any order you want, although if you use aliases, it might be required to _define_ an alias first before _using_ it in a privilege specification.&lt;BR /&gt;&lt;BR /&gt;If you need to authorize a long list of other commands for Nagios, you might wish to use a command alias:&lt;BR /&gt;&lt;BR /&gt;----&lt;BR /&gt;Cmnd_Alias NAGIOSCMDS = /usr/bin/du, /usr/bin/something_else, /usr/sbin/a_third_command, &lt;ETC...&gt;&lt;BR /&gt;&lt;BR /&gt;nagios ALL=(root) NOPASSWD: NAGIOSCMDS&lt;BR /&gt;----&lt;BR /&gt;&lt;BR /&gt;When your sudo configuration becomes more complex, using the aliases allows you to group things so that you can keep the actual privilege specifications short, simple and easy to understand.&lt;BR /&gt;&lt;BR /&gt;But if you need just to authorize one user to run one or two commands, aliases are not necessary.&lt;BR /&gt;&lt;BR /&gt;MK&lt;/ETC...&gt;</description>
      <pubDate>Fri, 29 Jan 2010 07:31:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/modifying-the-sudo-file/m-p/4573761#M60313</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-01-29T07:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying the sudo file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/modifying-the-sudo-file/m-p/4573762#M60314</link>
      <description>Cmnd_Alias is the better option.</description>
      <pubDate>Fri, 29 Jan 2010 11:18:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/modifying-the-sudo-file/m-p/4573762#M60314</guid>
      <dc:creator>Jupinder Bedi</dc:creator>
      <dc:date>2010-01-29T11:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying the sudo file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/modifying-the-sudo-file/m-p/4573763#M60315</link>
      <description>&amp;gt;My question is the following, when looking at the sudo file, is there a particular section where the above syntax should be inserted in order for it to work?&lt;BR /&gt;&lt;BR /&gt;It is not important where (what line no.) you will put the new line.&lt;BR /&gt;&lt;BR /&gt;There are no "sections" in sudoers file.&lt;BR /&gt;&lt;BR /&gt;The lines preceeded by # are comments. And this is all.&lt;BR /&gt;&lt;BR /&gt;It is important to respect the sintax.&lt;BR /&gt;&lt;BR /&gt;You do not need aliases if you only assign right to one or two users and/or to one/two or so commands&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Horia.</description>
      <pubDate>Fri, 29 Jan 2010 11:26:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/modifying-the-sudo-file/m-p/4573763#M60315</guid>
      <dc:creator>Horia Chirculescu</dc:creator>
      <dc:date>2010-01-29T11:26:37Z</dc:date>
    </item>
  </channel>
</rss>

