<?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: Sudoers help needed. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sudoers-help-needed/m-p/2580635#M31763</link>
    <description>from the sudoers man page..&lt;BR /&gt;&lt;BR /&gt;By default, sudo requires that a user authenticate him or herself before running a command.  This behavior can be modified via the NOPASSWD tag.  Like a Runas_Spec, the NOPASSWD tag sets a default for the commands that follow it in the Cmnd_Spec_List.  Conversely, the PASSWD tag can be used to reverse things.  For example:&lt;BR /&gt;&lt;BR /&gt;ray    rushmore =&lt;BR /&gt;NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm&lt;BR /&gt;&lt;BR /&gt;would allow the user ray to run /bin/kill, /bin/ls, and /usr/bin/lprm&lt;BR /&gt;as root on the machine rushmore as root without authenticating&lt;BR /&gt;himself.  If we only want ray to be able to run /bin/kill without a&lt;BR /&gt;password the entry would be:&lt;BR /&gt;&lt;BR /&gt;ray    rushmore = NOPASSWD: /bin/kill, PASSWD: /bin/ls, /usr/bin/lprm&lt;BR /&gt;</description>
    <pubDate>Mon, 17 Sep 2001 18:10:29 GMT</pubDate>
    <dc:creator>Kevin Wright</dc:creator>
    <dc:date>2001-09-17T18:10:29Z</dc:date>
    <item>
      <title>Sudoers help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudoers-help-needed/m-p/2580633#M31761</link>
      <description>Hi paranoics,&lt;BR /&gt;&lt;BR /&gt;without having to write an own server (with  little help from Perl's IO::Socket) I would like to enable a webserver process on another box to execute some non-perilious commands via a ssh connection through CGI.&lt;BR /&gt;Being aware about the security implications of CGI (for sure the Perl's taint check wouldn't pass remote commands on even another system without dying in the compile phase) I want to reduce them to a bearable minimum.&lt;BR /&gt;To this end I installed sudo on the remote box, and could hapilly have sudo watch after commands of normally unprivileged users. This works fine as long as the whole thing takes place on this box alone.&lt;BR /&gt;But I'm almost dispairing in making this work (without password) checking from the webserver's box.&lt;BR /&gt;Seems this EBNF stuff in sudoers manpage is too oblique to my mind?&lt;BR /&gt;&lt;BR /&gt;What I sort of want to achieve is such:&lt;BR /&gt;&lt;BR /&gt;on the webserver box execute as user webuser (i.e. httpd account on AIX, unprivileged)&lt;BR /&gt;&lt;BR /&gt;$cmd="/usr/local/bin/ssh -l $account_on_hp_box $hostname_of_hp_box /usr/local/bin/sudo /usr/bin/cat /stand/system";&lt;BR /&gt;open PIPE, "$cmd |" or die "blabla:$!\n";&lt;BR /&gt;while (&lt;PIPE&gt;) {&lt;BR /&gt;# parse output here into HTML&lt;BR /&gt;}&lt;BR /&gt;close PIPE;&lt;BR /&gt;&lt;BR /&gt;I definitely don't want to put user webuser from the AIX box into $account_on_hp_box's .shosts file.&lt;BR /&gt;&lt;BR /&gt;But of course then I'm always aked for a password, whoch the webserver cannot and should not supply.&lt;BR /&gt;&lt;BR /&gt;I thought to put kind of these alii in /etc/sudoers&lt;BR /&gt;&lt;BR /&gt;Host_Alias    WWWSERV = IP_of_webserver&lt;BR /&gt;&lt;BR /&gt;User_Alias    WWWUSER = webuser&lt;BR /&gt;&lt;BR /&gt;Cmd_Alias     WWWCMD = /usr/bin/cat /stand/system&lt;BR /&gt;&lt;BR /&gt;WWWUSER    WWWSERV = NOPASSWD: WWWCMD&lt;BR /&gt;&lt;BR /&gt;This doesn't work.&lt;BR /&gt;What is the correct syntax for commands executed by users on remote hosts?&lt;/PIPE&gt;</description>
      <pubDate>Mon, 17 Sep 2001 17:32:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudoers-help-needed/m-p/2580633#M31761</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2001-09-17T17:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sudoers help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudoers-help-needed/m-p/2580634#M31762</link>
      <description>I hope I got it right (enough): you don't want the web server to know the passwd but you want it to be able to run a sudo command without providing a passwd. &lt;BR /&gt;&lt;BR /&gt;I'm sure that the sudo gurus have the answer ... but ... why don't you just vi a script on the system you run sudo on and call it remotely using ssh. &lt;BR /&gt;&lt;BR /&gt;The script might look like:&lt;BR /&gt;sudo $cmd &amp;lt; password.&lt;BR /&gt;&lt;BR /&gt;The password is still readable but:&lt;BR /&gt;- you can make the sctipt readable only by the user&lt;BR /&gt;- the webserver doesn't have to know the passwd&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ovidiu&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Sep 2001 17:56:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudoers-help-needed/m-p/2580634#M31762</guid>
      <dc:creator>Ovidiu D. Raita</dc:creator>
      <dc:date>2001-09-17T17:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sudoers help needed.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudoers-help-needed/m-p/2580635#M31763</link>
      <description>from the sudoers man page..&lt;BR /&gt;&lt;BR /&gt;By default, sudo requires that a user authenticate him or herself before running a command.  This behavior can be modified via the NOPASSWD tag.  Like a Runas_Spec, the NOPASSWD tag sets a default for the commands that follow it in the Cmnd_Spec_List.  Conversely, the PASSWD tag can be used to reverse things.  For example:&lt;BR /&gt;&lt;BR /&gt;ray    rushmore =&lt;BR /&gt;NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm&lt;BR /&gt;&lt;BR /&gt;would allow the user ray to run /bin/kill, /bin/ls, and /usr/bin/lprm&lt;BR /&gt;as root on the machine rushmore as root without authenticating&lt;BR /&gt;himself.  If we only want ray to be able to run /bin/kill without a&lt;BR /&gt;password the entry would be:&lt;BR /&gt;&lt;BR /&gt;ray    rushmore = NOPASSWD: /bin/kill, PASSWD: /bin/ls, /usr/bin/lprm&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Sep 2001 18:10:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudoers-help-needed/m-p/2580635#M31763</guid>
      <dc:creator>Kevin Wright</dc:creator>
      <dc:date>2001-09-17T18:10:29Z</dc:date>
    </item>
  </channel>
</rss>

