<?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: sudo in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082015#M440718</link>
    <description>closed</description>
    <pubDate>Thu, 29 Nov 2007 10:51:26 GMT</pubDate>
    <dc:creator>A.G.M. Velthof</dc:creator>
    <dc:date>2007-11-29T10:51:26Z</dc:date>
    <item>
      <title>sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082002#M440705</link>
      <description>hello all,&lt;BR /&gt;&lt;BR /&gt;does anyone have any experience with sudo and sudoers.&lt;BR /&gt;I want user1 to execute /usr/bin/command as user user2 without a password.&lt;BR /&gt;The entry in sudoersis:&lt;BR /&gt;user1  all = NOPASSWD user2: /usr/bin/command&lt;BR /&gt;&lt;BR /&gt;It doesn't work. What is going wrong.&lt;BR /&gt;&lt;BR /&gt;Regards, Alfons</description>
      <pubDate>Thu, 29 Nov 2007 09:00:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082002#M440705</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2007-11-29T09:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082003#M440706</link>
      <description>Does it give you an error? or is it just prompting which obviously your trying to prevent?&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Nov 2007 09:03:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082003#M440706</guid>
      <dc:creator>Dave Hutton</dc:creator>
      <dc:date>2007-11-29T09:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082004#M440707</link>
      <description>Greetings,&lt;BR /&gt;&lt;BR /&gt;I dont understand you syntax...not sure what you want...&lt;BR /&gt;&lt;BR /&gt;I would do:&lt;BR /&gt;user1 = (root) NOPASSWD:/usr/bin/su user2 -c usr/bin/command&lt;BR /&gt;&lt;BR /&gt;Is that what you are trying to achieve?&lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;Victor</description>
      <pubDate>Thu, 29 Nov 2007 09:15:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082004#M440707</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2007-11-29T09:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082005#M440708</link>
      <description>I hope you corrected:&lt;BR /&gt;missing ALL =...&lt;BR /&gt;&lt;BR /&gt;I just tested:&lt;BR /&gt;e.g.&lt;BR /&gt;sas9 ALL = (root) NOPASSWD:/usr/bin/su vbe -c ksh&lt;BR /&gt;ant:/opt/sudo $ id&lt;BR /&gt;uid=601(sas9) gid=2(bin)&lt;BR /&gt;ant:/opt/sudo $ /usr/local/bin/sudo -l&lt;BR /&gt;User sas9 may run the following commands on this host:&lt;BR /&gt;    (root) NOPASSWD: /usr/bin/su vbe -c ksh&lt;BR /&gt;ant:/opt/sudo $ sudo /usr/bin/su vbe -c ksh&lt;BR /&gt;ksh: sudo:  not found&lt;BR /&gt;ant:/opt/sudo $ /usr/local/bin/sudo /usr/bin/su vbe -c ksh&lt;BR /&gt;ant:/opt/sudo $ id&lt;BR /&gt;uid=200(vbe) gid=2(bin) &lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;Victor&lt;BR /&gt;(putting back sudoers in previous state...)</description>
      <pubDate>Thu, 29 Nov 2007 09:33:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082005#M440708</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2007-11-29T09:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082006#M440709</link>
      <description>You said:&lt;BR /&gt;&lt;QUOTE&gt;&lt;BR /&gt;The entry in sudoersis:&lt;BR /&gt;user1 all = NOPASSWD user2: /usr/bin/command&lt;BR /&gt;&lt;/QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;I think that is incorrect.  Here is what I have  in sudoers:&lt;BR /&gt;&lt;BR /&gt;# Host Aliases&lt;BR /&gt;Host_Alias      HR=systema,systemb&lt;BR /&gt;&lt;BR /&gt;# User Aliases&lt;BR /&gt;User_Alias      EDI=ediprod,editest&lt;BR /&gt;&lt;BR /&gt;# Command Aliases&lt;BR /&gt;Cmnd_Alias      COMMAND=/path/to/command&lt;BR /&gt;Cmnd_Alias      COMMAND2=/path/to/command2&lt;BR /&gt;&lt;BR /&gt;# User Privilege section&lt;BR /&gt;EDI     HR=(user1) NOPASSWD: COMMAND, COMMAND2&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The above will allow the users defined as EDI in the "User Aliase section" to run the commands defined as COMMAND and COMMAND2 on the systems defined as HR as user1 with no password required.</description>
      <pubDate>Thu, 29 Nov 2007 09:48:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082006#M440709</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-11-29T09:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082007#M440710</link>
      <description>I'm trying this:&lt;BR /&gt;&lt;BR /&gt;user1 is not allowed in a specific directory, and user2 is.&lt;BR /&gt;So I have to allow user1 to run a script in that specific directory.&lt;BR /&gt;&lt;BR /&gt;The entry in sudoers is now:&lt;BR /&gt;user1  ALL = (users2) NOPASSWD: /usr/bin/ls&lt;BR /&gt;&lt;BR /&gt;After executing: &lt;BR /&gt;/usr/local/bin/sudo -u user2 -s /usr/bin/ls&lt;BR /&gt;I get the error:&lt;BR /&gt;naxora: sudo:  user1:  command not allowed; TTY=ttyp3; PWD=/FP01/mto USER=user2; COMMAND=/usr/bin/ksh /usr/bin/ls&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 29 Nov 2007 09:56:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082007#M440710</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2007-11-29T09:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082008#M440711</link>
      <description>That is why I proposed my syntax...&lt;BR /&gt;You have to be user2 first to be abe to access the directory...&lt;BR /&gt;and so:&lt;BR /&gt;user1 ALL = (root) NOPASSWD:/usr/bin/su user2 -c &lt;COMMAND&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Thu, 29 Nov 2007 10:05:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082008#M440711</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2007-11-29T10:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082009#M440712</link>
      <description>Patrick,&lt;BR /&gt;&lt;BR /&gt;I created the file the way You did.&lt;BR /&gt;When I do a sudo -l everything is ok.&lt;BR /&gt;&lt;BR /&gt;when I do a:&lt;BR /&gt; EDI HR=(user1) NOPASSWD: COMMAND, COMMAND2&lt;BR /&gt;&lt;BR /&gt;I get an error syntax error at line 1 '(' unexpected.</description>
      <pubDate>Thu, 29 Nov 2007 10:22:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082009#M440712</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2007-11-29T10:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082010#M440713</link>
      <description>&lt;QUOTE&gt;&lt;BR /&gt;when I do a:&lt;BR /&gt;EDI HR=(user1) NOPASSWD: COMMAND, COMMAND2&lt;BR /&gt;&lt;/QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;Where are you doing that?  Are you trying to run that from a command prompt?  If so, that will definitely not work.  That line is part of the sudoers file.&lt;BR /&gt;&lt;BR /&gt;With my configuration in place, an edi user can do a:&lt;BR /&gt;&lt;BR /&gt;$ sudo /path/to/command&lt;BR /&gt;&lt;BR /&gt;and it will run as the user user1 and not request a password.&lt;BR /&gt;&lt;BR /&gt;Have a read through the 'sudoers' man page as a LOT of this is explained pretty well.</description>
      <pubDate>Thu, 29 Nov 2007 10:29:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082010#M440713</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-11-29T10:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082011#M440714</link>
      <description>Patrick,&lt;BR /&gt;&lt;BR /&gt;no, I was not running that from the command prompt. I was the entry in the sudoers file.&lt;BR /&gt;&lt;BR /&gt;From the command prompt as user "user1" I ran:&lt;BR /&gt;/usr/local/bin/sudo -u user2 -s /usr/bin/ls</description>
      <pubDate>Thu, 29 Nov 2007 10:34:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082011#M440714</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2007-11-29T10:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082012#M440715</link>
      <description>Victor,&lt;BR /&gt;&lt;BR /&gt;I have Your solution working. Thanks.&lt;BR /&gt;I thought Patricks solution should work as well. &lt;BR /&gt;So I will give that another shot.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 29 Nov 2007 10:39:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082012#M440715</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2007-11-29T10:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082013#M440716</link>
      <description>Hi again,&lt;BR /&gt;Patrick solution works also, it is equivalent to aliases...&lt;BR /&gt;&lt;BR /&gt;IN Your command line is -s a display artefact or is that you mistake (should be -c)&lt;BR /&gt;as user1 what does sudo -l give you?</description>
      <pubDate>Thu, 29 Nov 2007 10:44:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082013#M440716</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2007-11-29T10:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082014#M440717</link>
      <description>Victor,&lt;BR /&gt;&lt;BR /&gt;You are correct it should be -c&lt;BR /&gt;&lt;BR /&gt;Thanks to all of You, I will close the thread&lt;BR /&gt;&lt;BR /&gt;Regards, Alfons</description>
      <pubDate>Thu, 29 Nov 2007 10:48:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082014#M440717</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2007-11-29T10:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: sudo</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082015#M440718</link>
      <description>closed</description>
      <pubDate>Thu, 29 Nov 2007 10:51:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo/m-p/5082015#M440718</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2007-11-29T10:51:26Z</dc:date>
    </item>
  </channel>
</rss>

