Smb(3pm) User Contributed Perl Documentation Smb(3pm)NAME
Authen::Smb - Perl extension to authenticate against an SMB server
SYNOPSIS
use Authen::Smb;
my $authResult = Authen::Smb::authen('myUser',
'myPassword',
'myPDC',
'myBDC',
'myNTDomain');
if ( $authResult == Authen::Smb::NO_ERROR ) {
print "User successfully authenticated.
";
} else {
print "User not authenticated with error level $authResult
";
}
DESCRIPTION
Authen::Smb allows you to authenticate a user against an NT domain. You can specify both a primary and a backup server to use for
authentication. The NT names of the machines should be used for specifying servers.
An authentication request will return one of four values:
NTV_NO_ERROR(0)NTV_SERVER_ERROR(1)NTV_PROTOCOL_ERROR(2)NTV_LOGON_ERROR(3)
NTV_NO_ERROR is the only return value possible for a successful authentication. All other return values indicate failure, of one sort or
another.
EXPORT_OK constants
NTV_LOGON_ERROR
NTV_NO_ERROR
NTV_PROTOCOL_ERROR
NTV_SERVER_ERROR
AUTHOR
Patrick Michael Kane, modus@pr.es.to Based on the smbval library from the samba package
SEE ALSO perl(1).
perl v5.14.2 1999-06-07 Smb(3pm)
Check Out this Related Man Page
HTTP::Server::Simple::Authen(3pm) User Contributed Perl Documentation HTTP::Server::Simple::Authen(3pm)NAME
HTTP::Server::Simple::Authen - Authentication plugin for HTTP::Server::Simple
SYNOPSIS
package MyServer;
use base qw( HTTP::Server::Simple::Authen HTTP::Server::Simple::CGI);
use Authen::Simple::Passwd;
sub authen_handler {
Authen::Simple::Passwd->new(passwd => '/etc/passwd');
}
sub handle_request {
my($self, $cgi) = @_;
my $user = $self->authenticate or return;
...
}
MyServer->new->run();
DESCRIPTION
HTTP::Server::Simple::Authen is an HTTP::Server::Simple plugin to allow HTTP authentication. Authentication scheme is pluggable and you can
use whatever Authentication protocol that Authen::Simple supports.
You can use "authenticate" method whatever you want to authenticate the request. The method returns $username taken from the request if the
authentication is successful, and "undef" otherwise. The code in "SYNOPSIS" requires authentication for all the requests and behaves just
the same as Apache's "Require valid-user".
The following code will explain more about conditioning.
sub handle_request {
my($self, $cgi) = @_;
if ($cgi->path_info =~ m!/foo/!) {
my $user = $self->authenticate;
return unless defined($user) && length($user) == 8;
}
...
}
This means all the requests to URL "/foo/" require to be authenticated, and usernames with 8 chars long are authorized.
METHODS
Your subclass has to override following methods to implement HTTP authentication.
authen_handler
Should return a valid Authen::Simple instance to authenticate HTTP request (Required).
authen_realm
Returns a string for Authentication realm to be shown in the browser's dialog box. Defaults to 'Authorized area'.
AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
HTTP::Server::Simple, Authen::Simple
perl v5.12.3 2006-01-15 HTTP::Server::Simple::Authen(3pm)
I am using Samba 3.0.33. The user.map file is not referred anywhere is Smb.conf. Infact, I couldn't see the user.map file any where in samba. But everything seems to be working. Is there an alternative way to refer to the users list. (2 Replies)
1) Environment:Red Hat Linux, bash shell
Script to be run owned by user :myUser
Home environment of myUser: pathto/home
2) ESP agent with root access will run
JobXXX.sh
su - myUser -c "/pathto/home/bin/script.sh"
where script.sh has some echo statements and an exit statement in the end... (4 Replies)
Can someone please posts the steps needed to configure a UNIX server to authenticate with a TACACS+ server or point me in the right direction been googling for 2 days now. Thanks (0 Replies)
Can someone please posts the steps needed to configure a UNIX server to authenticate with a TACACS+ server or point me in the right direction been googling for 2 days now. Thanks (0 Replies)
So what i am trying to accomplish is the following:
a share that is browse-able by every one on the network with a group of people that can write to it with out ownership problems. I am extremely new to samba/linux and any help would be greatly appreciated. It is a stand alone server running samba... (3 Replies)
I would like the smb and nmb to start on boot.
In the terminal (as root) I did:
/sbin/chkconfig smb --addor
chkconfig --add sambaor
chkconfig --add /sbin/smbdresault is message like below :
error reading information on service smb: No such file or directory
Please use CODE tags as... (2 Replies)