Re: Re: Basic Login as domain\username

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, 

I was able to implement and to change the incoming username and to update it for real login. A new perl module has to be written 

Here is the  perl code:


sub handler
{
  my $r = shift;
  my $c = $r->connection;

  my $auth_header = $r->headers_in->get('Authorization') || '';
  my $credentials = (split / /, $auth_header)[-1] || '';
  my ($username,$password) = split /:/,MIME::Base64::decode($credentials), 2;
 
  if (defined($username) && ( $username =~ /^([A-Za-z]+\\)/))
  {
    my @usr_parts = (split /\\/,$username);
    $username = lc($usr_parts[1]);
  }
  return DECLINED unless $username;
  $credentials = MIME::Base64::encode(join(':',$username,$password));
  $r->headers_in->set(Authorization =>"Basic $credentials");
  #Procced to login to the system.
  return OK;
}
1;

Then at Apache conf file, you need to mention the module name of the code

Regards


On Wed, Jun 11, 2014 at 2:08 PM, Darly Senecal Baptiste <dsenecalb@xxxxxxxxx> wrote:
(Starting to walk at the waters of mod_perl). Is there is a way that  mod_perl gathers the information from the login screen before performing the authentication session?


On Tue, Jun 10, 2014 at 11:55 AM, Eric Covener <covener@xxxxxxxxx> wrote:
On Tue, Jun 10, 2014 at 11:53 AM, Darly Senecal Baptiste
<dsenecalb@xxxxxxxxx> wrote:
> Hi Eric,
>
> What do you think about using the mod_perl module in terms of gather the
> domain\username and process modify in order to login as username?

Probably feasible

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux