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

[no subject]



yes.

getpwnam() takes one argument.  The username.  It returns a data object
that contains password.  What you are telling me is that it is the LDAPs
responsibility to auth the user.  So I must send the password and name
to LDAP for auth.  getpwnam() does not work that way. It requires the
app to do the password checking.   My method of placing the ldap code
inside of getpwnam() would automatically make all programs like OpenSSH
support LDAP by default.  

Here is how getpwnam() is used. In pseudo code.

printf("Username: ");
char *user = read();
printf("Password: ");
char *password = read();
struct passwd *p = getpwnam(user);
char *pass = crypt(password, p->passwd);
if(strcmp(pass, p->passwd) != 0) {
  die("Invalid login.\n");
}

exec(p->shell);

Notice how the code above was responsible for verifying the password.
what you told me was that the LDAP server does that job.





</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00269" href="msg00269.html">[ale] How LDAP works with authentication</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00286" href="msg00286.html">[ale] How LDAP works with authentication</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
<li><strong><a name="00294" href="msg00294.html">[ale] How LDAP works with authentication</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00300" href="msg00300.html">[ale] How LDAP works with authentication</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
<li><strong><a name="00302" href="msg00302.html">[ale] How LDAP works with authentication</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00305" href="msg00305.html">[ale] How LDAP works with authentication</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
<li><strong><a name="00310" href="msg00310.html">[ale] How LDAP works with authentication</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00315" href="msg00315.html">[ale] How LDAP works with authentication</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
<li><strong><a name="00316" href="msg00316.html">[ale] How LDAP works with authentication</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00319" href="msg00319.html">[ale] How LDAP works with authentication</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00319.html">[ale] How LDAP works with authentication</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00322.html">[ale]  Flaky Keyboard</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00319.html">[ale] How LDAP works with authentication</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00318.html">[ale] How LDAP works with authentication</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00320"><strong>Date</strong></a></li>
<li><a href="threads.html#00320"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>