<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-GB;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Is there a possibility that there is an LDAP account with the same username as your admin login?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If so, this block:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">my $entr = $result->pop_entry;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">unless( defined $entr )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> … #check local admin account<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">would get passed over – and checked against LDAP for the password.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Putting this block first (from the first block of config on the wiki):<o:p></o:p></span></p>
<pre>my $user = $repo->user_by_username( $username );<o:p></o:p></pre>
<pre> return unless $user;<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> $username = $user->value( "username" );<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> my $user_type = $user->get_type;<o:p></o:p></pre>
<pre> if( $user_type eq "admin" )<o:p></o:p></pre>
<pre> {<o:p></o:p></pre>
<pre> # internal authentication for "admin" type<o:p></o:p></pre>
<pre> return $repo->database->valid_login( $username, $password );<o:p></o:p></pre>
<pre> }<o:p></o:p></pre>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">would confirm if this is the case or not.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">John<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>On Behalf Of </b>Denis Pitzalis<br>
<b>Sent:</b> 03 December 2015 09:43<br>
<b>To:</b> Eprints Tech Mailing List<br>
<b>Subject:</b> [EP-tech] Re: With LDAP user_login.pl script local users can’t login<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Hi Guys, I confirm the issue. <br>
I have a similar configuration using LDAP and Kerberos to authenticate users from my organization. The login mechanism works fine but I am unable to register/authenticate non LDAP users.
<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Now that I think about, do you think it is possible to use different login systems depending on the email?<o:p></o:p></p>
</div>
<p class="MsoNormal">Denis<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, Dec 3, 2015 at 10:32 AM, Field A.N. <<a href="mailto:af05v@ecs.soton.ac.uk" target="_blank">af05v@ecs.soton.ac.uk</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Can LDAP authenticated accounts log in? Can you paste the code in your
<a href="http://user_login.pl" target="_blank">user_login.pl</a> file here?<br>
<br>
<br>
<br>
--<br>
Adam Field<br>
Business Relationship Manager and Community Lead<br>
EPrints Services<br>
<a href="tel:%2B44%20%280%2923%208059%208814">+44 (0)23 8059 8814</a><br>
<br>
<br>
<br>
<br>
<br>
On 3 Dec 2015, at 09:28, pgasinos pgs wrote:<br>
<br>
> I have tried to use the wiki's tutorial about LDAP. I have changed user_roles according to the instructions. The script I have used is "LDAP Authentication with On-Demand Creation of Users" but I couldn't login as administrator. Eprints failed to authenticate
with my local admin account.<br>
> *** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" target="_blank">
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
> *** Archive: <a href="http://www.eprints.org/tech.php/" target="_blank">http://www.eprints.org/tech.php/</a><br>
> *** EPrints community wiki: <a href="http://wiki.eprints.org/" target="_blank">
http://wiki.eprints.org/</a><br>
> *** EPrints developers Forum: <a href="http://forum.eprints.org/" target="_blank">
http://forum.eprints.org/</a><br>
<br>
<br>
*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" target="_blank">
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
*** Archive: <a href="http://www.eprints.org/tech.php/" target="_blank">http://www.eprints.org/tech.php/</a><br>
*** EPrints community wiki: <a href="http://wiki.eprints.org/" target="_blank">http://wiki.eprints.org/</a><br>
*** EPrints developers Forum: <a href="http://forum.eprints.org/" target="_blank">
http://forum.eprints.org/</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">----------------------<br>
Denis Pitzalis, PhD<br>
Web Lead Developer<br>
<br>
UNESCO - <a href="http://www.unesco.org" target="_blank">http://www.unesco.org</a>
<br>
Paris, France - Tel: +33145681816<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>