You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Andrew Afliatunov <an...@taom.ru> on 2002/02/11 09:56:15 UTC

Samba authorization

Hi!

I want to use authorization against NT server for some directories of my
web server (apache 1.3.22 on SunOS 5.8). So I installed mod_perl-1.26
(configured with EVERYTHING=1), installed Authen-Smb-0.91 and
Apache-AuthenSmb-0.60, made corresponding changes in httpd.conf.
(
<Directory "/u01/httpd/docs/admin">
    Options Indexes FollowSymLinks Includes
    AllowOverride None
        AuthType Basic
        PerlSetVar myPDC e250.taom.lan
        PerlSetVar myBDC e250.taom.lan
        PerlSetVar myDOMAIN ACADEMY
        AuthName "Administrator's page"
        require user u0100659
    PerlAuthenHandler Apache::AuthenSmb
</Directory>
).
But when I try to go to the directory, apache says - "Internal Server
Error", and in error.log file I see "Undefined subroutine
&Apache::AuthenSmb::handler called". But all necessary files shurely
exist and they have appropriate rights. I can't understand what's the
matter? Please, help!


--
Andrew




Re: Samba authorization

Posted by "Rafiq Ismail (ADMIN)" <ra...@joshua.dreamthought.com>.
Have you tried running a locate on AuthenSmb.pm to make sure that it's
under your @INC?  Wondering whether you installed it in the correct
location?  Try sticking a :
<Perl>
	use lib "path/to/Apache";
</Perl>

a little higher up.


Fiq

On Mon, 11 Feb 2002, Andrew Afliatunov wrote:

> Hi!
>
> I want to use authorization against NT server for some directories of my
> web server (apache 1.3.22 on SunOS 5.8). So I installed mod_perl-1.26
> (configured with EVERYTHING=1), installed Authen-Smb-0.91 and
> Apache-AuthenSmb-0.60, made corresponding changes in httpd.conf.
> (
> <Directory "/u01/httpd/docs/admin">
>     Options Indexes FollowSymLinks Includes
>     AllowOverride None
>         AuthType Basic
>         PerlSetVar myPDC e250.taom.lan
>         PerlSetVar myBDC e250.taom.lan
>         PerlSetVar myDOMAIN ACADEMY
>         AuthName "Administrator's page"
>         require user u0100659
>     PerlAuthenHandler Apache::AuthenSmb
> </Directory>
> ).
> But when I try to go to the directory, apache says - "Internal Server
> Error", and in error.log file I see "Undefined subroutine
> &Apache::AuthenSmb::handler called". But all necessary files shurely
> exist and they have appropriate rights. I can't understand what's the
> matter? Please, help!
>
>
> --
> Andrew
>
>
>
>


Re: Samba authorization

Posted by Andrew Afliatunov <an...@taom.ru>.
> >Syntax error on line 346 of /usr/local/apache/conf/httpd.conf:
> >Can't load
> >'/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/Authen/Smb/Smb.so' for
> >module Authen::Smb: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation
> >error: file
> >/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/Authen/Smb/Smb.so:
> >symbol main: referenced symbol not found at
> >/usr/local/lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206.
> >  at /usr/local/lib/perl5/site_perl/5.6.1/Apache/AuthenSmb.pm line 5
> >Compilation failed in require at
> >/usr/local/lib/perl5/site_perl/5.6.1/Apache/AuthenSmb.pm line 5.
> >BEGIN failed--compilation aborted at
> >/usr/local/lib/perl5/site_perl/5.6.1/Apache/AuthenSmb.pm line 5.
> >Compilation failed in require at (eval 3) line 3.
> >--
> >Line 5 of AuthenSmb.pm contains 'use Authen::Smb'. Why apache can't find it?
> >(Smb.pm does exist.)
>
> This is a different problem: It's related to your Authen::Smb installation
> (which Apache::AuthenSmb makes use of to handle its authentication
> requests). You might want to try and re-install it.
>
> --
> Per Einar Ellefsen
> per.einar@skynet.be

Maybe it's actually problem with Smb.so. When I make 'ldd -r Smb.so', I get
        symbol not found: main
        symbol not found: PL_markstack_ptr
        symbol not found: PL_na
        symbol not found: PL_sv_yes
        symbol not found: PL_stack_base
        symbol not found: PL_stack_sp
        symbol not found: PL_curpad
        symbol not found: PL_op
        symbol not found: perl_get_sv
        symbol not found: Perl_croak
        symbol not found: Perl_sv_setiv
        symbol not found: connect
        symbol not found: Perl_mg_set
        symbol not found: Perl_sv_newmortal
        symbol not found: Perl_form
        symbol not found: socket
        symbol not found: Perl_sv_2pv
        symbol not found: Perl_newXS
        symbol not found: inet_addr
        symbol not found: setsockopt
        symbol not found: gethostbyname
        symbol not found: Perl_sv_2iv
        symbol not found: Perl_sv_setnv
But, again, on other our SunOS machine with the same configuration and same output
of 'ldd' (just two llines less) authorization work without problems!
What may be the reason?

--
Andrew




Re: Samba authorization

Posted by Andrew Afliatunov <an...@taom.ru>.
Per Einar Ellefsen wrote:

> [Please keep your replies on the list]
>
> At 16:21 11.02.2002 +0400, Andrew Afliatunov wrote:
> >Per Einar Ellefsen wrote:
> >
> > > Hi Andrew,
> > >
> > > At 12:56 11.02.2002 +0400, Andrew Afliatunov wrote:
> > > ><Directory "/u01/httpd/docs/admin">
> > > >     Options Indexes FollowSymLinks Includes
> > > >     AllowOverride None
> > > >         AuthType Basic
> > > >         PerlSetVar myPDC e250.taom.lan
> > > >         PerlSetVar myBDC e250.taom.lan
> > > >         PerlSetVar myDOMAIN ACADEMY
> > > >         AuthName "Administrator's page"
> > > >         require user u0100659
> > > >     PerlAuthenHandler Apache::AuthenSmb
> > > ></Directory>
> > > >).
> > >
> > > Have you loaded Apache::AuthenSmb before setting it as a PerlAuthenHandler
> > > ? The PerlAuthenHandler directive won't load the module for you, you need
> > > either
> > > PerlModule Apache::AuthenSmb
> > > in your httpd.conf, before the PerlAuthenHandler directive,
> >
> >When I put this in httpd.conf, 'apachectl configtest' gives this:
> >--
> >Syntax error on line 346 of /usr/local/apache/conf/httpd.conf:
> >Can't load
> >'/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/Authen/Smb/Smb.so' for
> >module Authen::Smb: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation
> >error: file
> >/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/Authen/Smb/Smb.so:
> >symbol main: referenced symbol not found at
> >/usr/local/lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206.
> >  at /usr/local/lib/perl5/site_perl/5.6.1/Apache/AuthenSmb.pm line 5
> >Compilation failed in require at
> >/usr/local/lib/perl5/site_perl/5.6.1/Apache/AuthenSmb.pm line 5.
> >BEGIN failed--compilation aborted at
> >/usr/local/lib/perl5/site_perl/5.6.1/Apache/AuthenSmb.pm line 5.
> >Compilation failed in require at (eval 3) line 3.
> >--
> >Line 5 of AuthenSmb.pm contains 'use Authen::Smb'. Why apache can't find it?
> >(Smb.pm does exist.)
>
> This is a different problem: It's related to your Authen::Smb installation
> (which Apache::AuthenSmb makes use of to handle its authentication
> requests). You might want to try and re-install it.
>

Yes, I guessed that it's a problem with Authen::Smb. I tried to reinstall it -
without success. By the way, on another our machine with SunOS 5.7 the same
configuration apache+mod_perl+Authen works perfectly, though I didn't put
'PerlModule Apache::AuthenSmb' in httpd.conf there.


--
Andrew




Re: Samba authorization

Posted by Per Einar Ellefsen <pe...@skynet.be>.
[Please keep your replies on the list]

At 16:21 11.02.2002 +0400, Andrew Afliatunov wrote:
>Per Einar Ellefsen wrote:
>
> > Hi Andrew,
> >
> > At 12:56 11.02.2002 +0400, Andrew Afliatunov wrote:
> > ><Directory "/u01/httpd/docs/admin">
> > >     Options Indexes FollowSymLinks Includes
> > >     AllowOverride None
> > >         AuthType Basic
> > >         PerlSetVar myPDC e250.taom.lan
> > >         PerlSetVar myBDC e250.taom.lan
> > >         PerlSetVar myDOMAIN ACADEMY
> > >         AuthName "Administrator's page"
> > >         require user u0100659
> > >     PerlAuthenHandler Apache::AuthenSmb
> > ></Directory>
> > >).
> >
> > Have you loaded Apache::AuthenSmb before setting it as a PerlAuthenHandler
> > ? The PerlAuthenHandler directive won't load the module for you, you need
> > either
> > PerlModule Apache::AuthenSmb
> > in your httpd.conf, before the PerlAuthenHandler directive,
>
>When I put this in httpd.conf, 'apachectl configtest' gives this:
>--
>Syntax error on line 346 of /usr/local/apache/conf/httpd.conf:
>Can't load
>'/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/Authen/Smb/Smb.so' for
>module Authen::Smb: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation
>error: file
>/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/Authen/Smb/Smb.so:
>symbol main: referenced symbol not found at
>/usr/local/lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206.
>  at /usr/local/lib/perl5/site_perl/5.6.1/Apache/AuthenSmb.pm line 5
>Compilation failed in require at
>/usr/local/lib/perl5/site_perl/5.6.1/Apache/AuthenSmb.pm line 5.
>BEGIN failed--compilation aborted at
>/usr/local/lib/perl5/site_perl/5.6.1/Apache/AuthenSmb.pm line 5.
>Compilation failed in require at (eval 3) line 3.
>--
>Line 5 of AuthenSmb.pm contains 'use Authen::Smb'. Why apache can't find it?
>(Smb.pm does exist.)

This is a different problem: It's related to your Authen::Smb installation 
(which Apache::AuthenSmb makes use of to handle its authentication 
requests). You might want to try and re-install it.


-- 
Per Einar Ellefsen
per.einar@skynet.be


Re: Samba authorization

Posted by Per Einar Ellefsen <pe...@skynet.be>.
Hi Andrew,

At 12:56 11.02.2002 +0400, Andrew Afliatunov wrote:
><Directory "/u01/httpd/docs/admin">
>     Options Indexes FollowSymLinks Includes
>     AllowOverride None
>         AuthType Basic
>         PerlSetVar myPDC e250.taom.lan
>         PerlSetVar myBDC e250.taom.lan
>         PerlSetVar myDOMAIN ACADEMY
>         AuthName "Administrator's page"
>         require user u0100659
>     PerlAuthenHandler Apache::AuthenSmb
></Directory>
>).
>But when I try to go to the directory, apache says - "Internal Server
>Error", and in error.log file I see "Undefined subroutine
>&Apache::AuthenSmb::handler called". But all necessary files shurely
>exist and they have appropriate rights. I can't understand what's the
>matter? Please, help!

Have you loaded Apache::AuthenSmb before setting it as a PerlAuthenHandler 
? The PerlAuthenHandler directive won't load the module for you, you need 
either
PerlModule Apache::AuthenSmb
in your httpd.conf, before the PerlAuthenHandler directive,
or
use Apache::AuthenSmb;
in your startup.pl file.

-- 
Per Einar Ellefsen
per.einar@skynet.be