<?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: PAM in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/pam/m-p/3813362#M268713</link>
    <description>Yes, but this script is just for testing purpouses. &lt;BR /&gt;&lt;BR /&gt;Since something like this script will be a PHP module, the suid bit takes no efect.&lt;BR /&gt;&lt;BR /&gt;There is any other way to give enought permissions to run this without runing apache as root (or setting the suid bit)?&lt;BR /&gt;&lt;BR /&gt;thank you all</description>
    <pubDate>Wed, 28 Jun 2006 01:20:14 GMT</pubDate>
    <dc:creator>JordiPrats</dc:creator>
    <dc:date>2006-06-28T01:20:14Z</dc:date>
    <item>
      <title>PAM</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pam/m-p/3813360#M268711</link>
      <description>Hi all,&lt;BR /&gt;I need to checkout if a given user is a valid user by PAM.&lt;BR /&gt;&lt;BR /&gt;I have faced that I can only check this out with root permissions, but I don't want to run Apache with root permissions. There's any way to change this to allow an other user to do this?&lt;BR /&gt;&lt;BR /&gt;I'm using a HP-UX 11.11 PA-RISC 2.0&lt;BR /&gt;&lt;BR /&gt;I'm using this small script to test this:&lt;BR /&gt;======&lt;BR /&gt;#!/opt/perl/bin/perl&lt;BR /&gt;&lt;BR /&gt;use Authen::PAM;&lt;BR /&gt;&lt;BR /&gt;$service = "php";&lt;BR /&gt;$username = $ARGV[0];&lt;BR /&gt;$password = $ARGV[1];&lt;BR /&gt;&lt;BR /&gt;print "Usage: &lt;USERNAME&gt; &lt;PASSWORD&gt;\n" if ( $ARGV[0] eq "" );&lt;BR /&gt;&lt;BR /&gt;sub my_conv_func&lt;BR /&gt;{&lt;BR /&gt;    my @res;&lt;BR /&gt;        while ( @_ )&lt;BR /&gt;        {&lt;BR /&gt;            my $code = shift;&lt;BR /&gt;            my $msg = shift;&lt;BR /&gt;            my $ans = "";&lt;BR /&gt;&lt;BR /&gt;            $ans = $username if ($code == PAM_PROMPT_ECHO_ON() );&lt;BR /&gt;            $ans = $password if ($code == PAM_PROMPT_ECHO_OFF() );&lt;BR /&gt;&lt;BR /&gt;            push @res, (PAM_SUCCESS(),$ans);&lt;BR /&gt;        }&lt;BR /&gt;    push @res, PAM_SUCCESS();&lt;BR /&gt;    return @res;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;ref($pamh = new Authen::PAM($service, $username, \&amp;amp;my_conv_func)) ||&lt;BR /&gt;    die "Error code $pamh during PAM init!";&lt;BR /&gt;&lt;BR /&gt;$res = $pamh-&amp;gt;pam_authenticate;&lt;BR /&gt;if ( $res == PAM_SUCCESS() )&lt;BR /&gt;{&lt;BR /&gt;    print "Password OK!\n";&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;    print "Password incorrect!\n";&lt;BR /&gt;    print $pamh-&amp;gt;pam_strerror($res)."\n";&lt;BR /&gt;}&lt;BR /&gt;&lt;/PASSWORD&gt;&lt;/USERNAME&gt;</description>
      <pubDate>Tue, 27 Jun 2006 10:47:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pam/m-p/3813360#M268711</guid>
      <dc:creator>JordiPrats</dc:creator>
      <dc:date>2006-06-27T10:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: PAM</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pam/m-p/3813361#M268712</link>
      <description>Have you tried setting the SUID bit to the script? Considered also the use of sudo for this script only?</description>
      <pubDate>Tue, 27 Jun 2006 14:51:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pam/m-p/3813361#M268712</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-06-27T14:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: PAM</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pam/m-p/3813362#M268713</link>
      <description>Yes, but this script is just for testing purpouses. &lt;BR /&gt;&lt;BR /&gt;Since something like this script will be a PHP module, the suid bit takes no efect.&lt;BR /&gt;&lt;BR /&gt;There is any other way to give enought permissions to run this without runing apache as root (or setting the suid bit)?&lt;BR /&gt;&lt;BR /&gt;thank you all</description>
      <pubDate>Wed, 28 Jun 2006 01:20:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pam/m-p/3813362#M268713</guid>
      <dc:creator>JordiPrats</dc:creator>
      <dc:date>2006-06-28T01:20:14Z</dc:date>
    </item>
  </channel>
</rss>

