Loading ...
Sorry, an error occurred while loading the content.

[Fwd: Re: Stupid question of the day...] Apache-AuthenNIS

Expand Messages
  • Shannon Eric Peevey
    ... Subject: Re: Stupid question of the day... Date: Mon, 20 Oct 2003 18:28:04 -0000 From: Randy Trahan To: Shannon Eric Peevey
    Message 1 of 4 , Oct 20, 2003
    • 0 Attachment
      -------- Original Message --------
      Subject: Re: Stupid question of the day...
      Date: Mon, 20 Oct 2003 18:28:04 -0000
      From: Randy Trahan <randy_trahan@...>
      To: Shannon Eric Peevey <speeves@...>



      Hi Shannon,

      I was reading your post from June 25 concerning authenNIS. I am on a
      Linux 8 machine and I am running Apache. I am trying to have NIS
      authenticate users who try to access a certian directory. I
      installed authenNIS and I put the appropriate directive in the main
      apache config file, but I don't even get an error message when I go
      to my "/protectected" directory in my file structure. Did you ever
      have this problem?

      Thanks!
      Randy


      --- In modperl@yahoogroups.com, Shannon Eric Peevey <speeves@u...>
      wrote:
      > Randy Kobes wrote:
      >
      > >On Wed, 25 Jun 2003 cwh0803@c... wrote:
      > >
      > >
      > >
      > >>I've built and installed a new Apache (2.0.46) with mod_ssl and
      > >>mod_perl... My goal is authentication via NIS, so I have the
      > >>following in an .htaccess file:
      > >>
      > >>AuthName TEST
      > >>AuthType Basic
      > >>PerlAuthenHandler Apache::AuthenNIS;
      > >>require valid-user
      > >>
      > >>My efforts, however, have been thwarted by the following error
      message:
      > >>
      > >>Wed Jun 25 15:44:54 2003] [error] failed to resolve handler
      > >>`Apache::AuthenNIS;' [Wed Jun 25 15:44:55 2003] [error] [client
      > >>xxx.xxx.xxx.xxx] Can't locate object method "boot" via package
      > >>"mod_perl::boot" at /opt/apache/lib/perl/Apache/Constants.pm
      > >>line 8. Compilation failed in require at
      > >>/opt/apache/lib/perl/Apache/AuthenNIS.pm line 4. BEGIN
      > >>failed--compilation aborted at
      > >>/opt/apache/lib/perl/Apache/AuthenNIS.pm line 4. Compilation
      > >>failed in require at (eval 6) line 1.
      > >>
      > >>
      > >
      > >Apache::Constants is a mod_perl 1 package, whereas you're using
      > >mod_perl 2 (for Apache 2). If use of Apache::compat isn't enough
      > >to get this working, some porting of the module may be required -
      > >see the discussion of porting Apache Perl modules from mod_perl 1
      > >to 2 at http://perl.apache.org/.
      > >
      > >
      > >
      > Feel free to contact me, as well. I have contacted the author
      about
      > porting the module, and if I can use you as a test environment, I
      can
      > this ported rather quickly :) (I don't have a NIS environment for
      me to
      > test on, but I can make the changes, and you can test the install
      for
      > me, and then we can get this mod to work for both versions of
      modperl...)
      >
      > Anyone have an installation of apache 1 that is using NIS for
      > authentication? (I will need to be able to test the ported mod for
      > compatibility with modperl 1, as well.)
      >
      > speeves
      > cws
      >
      > PS We should probably attack Apache::AuthzNIS at the same time...
      It
      > isn't much more work :)
    • Shannon Eric Peevey
      ... Hi! Can you send the config and/or .htaccess from that directory? Sounds like you probably don t have AuthType set... speeves cws PS Please,
      Message 2 of 4 , Oct 21, 2003
      • 0 Attachment
        Shannon Eric Peevey wrote:

        >
        >
        > -------- Original Message --------
        > Subject: Re: Stupid question of the day...
        > Date: Mon, 20 Oct 2003 18:28:04 -0000
        > From: Randy Trahan <randy_trahan@...>
        > To: Shannon Eric Peevey <speeves@...>
        >
        >
        >
        > Hi Shannon,
        >
        > I was reading your post from June 25 concerning authenNIS. I am on a
        > Linux 8 machine and I am running Apache. I am trying to have NIS
        > authenticate users who try to access a certian directory. I installed
        > authenNIS and I put the appropriate directive in the main apache
        > config file, but I don't even get an error message when I go to my
        > "/protectected" directory in my file structure. Did you ever have
        > this problem?
        >
        > Thanks!
        > Randy
        >
        >
        >
        Hi!

        Can you send the <Directory> config and/or .htaccess from that
        directory? Sounds like you probably don't have AuthType set...

        speeves
        cws

        PS Please, copy the list on your reply. Thanks :)
      • Randy
        Shannon, Thank you for getting back to me! I am running a newer version of apache that only has the httpd.conf configuration file. The text that I placed in
        Message 3 of 4 , Oct 21, 2003
        • 0 Attachment
          Shannon,

          Thank you for getting back to me!

          I am running a newer version of apache that only has
          the httpd.conf configuration file. The text that I
          placed in the file is as follows:

          #########################################3333

          # Stuff added by Randy

          alias /protected "/var/www/protected/"

          <Directory /protected>

          # This is the standard authentication stuff

          AuthName "Foo Bar Authentication"

          AuthType Basic



          PerlAuthenHandler Apache::AuthenNIS



          # Standard require stuff, NIS users or
          groups, and
          # "valid-user" all work OK

          require user username

          require valid-user



          # The following is actually only needed when
          authorizing
          # against NIS groups. This is a separate
          module.
          #PerlAuthzHandler Apache::AuthzNIS



          </Directory>

          #


          As far as the .htaccess file is concerned, I only did
          a "touch .htaccess" to create the file in the
          /protected directory. I did not find any
          documentation on WHAT needed to be put into the file.
          Also, should there be a .so module file for authenNIS
          in my httpd.conf file?

          Again, Thanks!
          Randy

          --- Shannon Eric Peevey <speeves@...> wrote:
          > Shannon Eric Peevey wrote:
          >
          > >
          > >
          > > -------- Original Message --------
          > > Subject: Re: Stupid question of the day...
          > > Date: Mon, 20 Oct 2003 18:28:04 -0000
          > > From: Randy Trahan <randy_trahan@...>
          > > To: Shannon Eric Peevey <speeves@...>
          > >
          > >
          > >
          > > Hi Shannon,
          > >
          > > I was reading your post from June 25 concerning
          > authenNIS. I am on a
          > > Linux 8 machine and I am running Apache. I am
          > trying to have NIS
          > > authenticate users who try to access a certian
          > directory. I installed
          > > authenNIS and I put the appropriate directive in
          > the main apache
          > > config file, but I don't even get an error message
          > when I go to my
          > > "/protectected" directory in my file structure.
          > Did you ever have
          > > this problem?
          > >
          > > Thanks!
          > > Randy
          > >
          > >
          > >
          > Hi!
          >
          > Can you send the <Directory> config and/or .htaccess
          > from that
          > directory? Sounds like you probably don't have
          > AuthType set...
          >
          > speeves
          > cws
          >
          > PS Please, copy the list on your reply. Thanks :)
          >


          __________________________________
          Do you Yahoo!?
          The New Yahoo! Shopping - with improved product search
          http://shopping.yahoo.com
        • Shannon Eric Peevey
          ... Hi! Finally had a chance to take a look at your stuff, and I think this is more of an Apache config problem than anything. If you throw something like:
          Message 4 of 4 , Oct 23, 2003
          • 0 Attachment
            Randy wrote:

            >Shannon,
            >
            >Thank you for getting back to me!
            >
            >I am running a newer version of apache that only has
            >the httpd.conf configuration file. The text that I
            >placed in the file is as follows:
            >
            >#########################################3333
            >
            ># Stuff added by Randy
            >
            >alias /protected "/var/www/protected/"
            >
            ><Directory /protected>
            >
            > # This is the standard authentication stuff
            >
            > AuthName "Foo Bar Authentication"
            >
            > AuthType Basic
            >
            >
            >
            > PerlAuthenHandler Apache::AuthenNIS
            >
            >
            >
            > # Standard require stuff, NIS users or
            >groups, and
            > # "valid-user" all work OK
            >
            > require user username
            >
            > require valid-user
            >
            >
            >
            > # The following is actually only needed when
            >authorizing
            > # against NIS groups. This is a separate
            >module.
            > #PerlAuthzHandler Apache::AuthzNIS
            >
            >
            >
            > </Directory>
            >
            >#
            >
            >
            >As far as the .htaccess file is concerned, I only did
            >a "touch .htaccess" to create the file in the
            >/protected directory. I did not find any
            >documentation on WHAT needed to be put into the file.
            >Also, should there be a .so module file for authenNIS
            >in my httpd.conf file?
            >
            >Again, Thanks!
            >Randy
            >
            >
            >
            Hi!

            Finally had a chance to take a look at your stuff, and I think this is
            more of an Apache config problem than anything. If you throw something
            like:



            <Limit GET PUT DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
            require valid-user
            </Limit>
            AuthName "Foo Bar Authentication"
            AuthType Basic

            into a .htaccess file in the directory, it will respond with the
            appropriate 401 header. (For some reason this same code in the
            <Directory> directive is not being read, (I have never aliased a
            directory without a .htaccess, so maybe that is it... You can probably
            try: http://httpd.apache.org/userslist.html. (I'm using apache1.3.27
            for these tests).

            BTW, Apache-AuthenNIS only queries the passwd.byname file at this time,
            which probably won't work in your environment, as most distros use
            shadow passwords at the very least now. I need to get excited about
            getting this working using the shadow.byname, so that we can find a real
            use for it nowadays... ;)

            HTH,
            speeves
            cws
          Your message has been successfully submitted and would be delivered to recipients shortly.