Authen...le::SMB(3pm)
π Authen::Simple::SMB (3pm) π
okay bestie, welcome to the User Contributed Perl Documentation page for Authen::Simple::SMB β yes that's the module name, and no I'm not shortening it, it's literally called that. sit down, grab a strawberry π, we're doing SMB authentication and it's gonna be so chill.
β¨ NAME β¨
Authen::Simple::SMB β Simple SMB authentication. that's it, that's the whole name section, it does what it says on the tin π
πΈ SYNOPSIS πΈ
here's the vibe, in code:
use Authen::Simple::SMB;
my $smb = Authen::Simple::SMB->new(
domain => 'DOMAIN',
pdc => 'PDC'
);
if ( $smb->authenticate( $username, $password ) ) {
# successfull authentication
}
# or as a mod_perl Authen handler
PerlModule Authen::Simple::Apache
PerlModule Authen::Simple::SMB
PerlSetVar AuthenSimpleSMB_domain "DOMAIN"
PerlSetVar AuthenSimpleSMB_pdc "PDC"
<Location /protected>
PerlAuthenHandler Authen::Simple::SMB
AuthType Basic
AuthName "Protected Area"
Require valid-user
</Location>
so you can use it plain, or you can go full mod_perl Authen handler mode and guard a <Location> block like the main character you are π the config vars are literally named after the options with AuthenSimpleSMB_ glued on the front, iykyk.
ngl that # successfull authentication comment has two L's and I am NOT fixing it, because the rule is we keep everything exactly as it is. copy-paste energy only π«Ά
π¦ DESCRIPTION π¦
you authenticate against an SMB server. that's the whole thing. no cap. it's giving "log into the Windows-y file sharing world from your lil Perl script" and honestly? iconic.
π METHODS π
π new
this method takes a hash of parameters. the following options are valid, and bestie, there's a Required situation so pay attention:
domainβ the domain to authenticate against. Required. like, you literally cannot skip this one.
domain => 'NTDOMAIN'
pdcβ the Primary Domain Controller. Required. also mandatory, no skipping, no "I'll add it later" π«
pdc => 'PDC'
bdcβ the Backup Domain Controller. this one's optional, it's the understudy, the backup dancer π
bdc => 'BDC'
logβ any object that supportsdebug,info,errorandwarn. so like, any logger that speaks that exact dialect of method names.
log => Log::Log4perl->get_logger('Authen::Simple::SMB')
π₯ authenticate( $username, $password )
returns true on success and false on failure. that's the whole contract. slay. simple as.
π SEE ALSO π
go read these too, they're the friends of this module:
Authen::Simple.Authen::Smb.
β AUTHOR β
Christian Hansen ch@ngmedia.com β shoutout, legend, the person who wrote this π
π COPYRIGHT π
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the page bestie!! this whole thing was Authen::Simple::SMB(3pm), generated as part of the User Contributed Perl Documentation, from perl v5.34.0, dated 2022-06-08. go authenticate something, ily, bye π¦β¨π
π¦ where this page comes from
- debian bookworm: libauthen-simple-smb-perl 0.1-5
- debian trixie: libauthen-simple-smb-perl 0.1-5
- ubuntu noble: libauthen-simple-smb-perl 0.1-5
- ubuntu resolute: libauthen-simple-smb-perl 0.1-5
- ubuntu stonking: libauthen-simple-smb-perl 0.1-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms