From: Marc Blumentritt <M.Blumentritt@tu-braunschweig.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] openldap: taking too much of time to authenticate
Date: Mon, 28 Aug 2006 09:50:52 +0200 [thread overview]
Message-ID: <44F2A05C.8060202@tu-braunschweig.de> (raw)
In-Reply-To: <6O59c-3tf-19@gated-at.bofh.it>
bijayant kumar schrieb:
> Hi,
> I have installed openldap on my gentoo-linux . My purpose is to use LDAP server for login authentication using PAM. slapd is running fine. ldapsearch command is also running fine. But the problem is, it takes too much time to authenticate the user. My local system is server as well as the client. Please help me. I followed step by step
> http://www.gentoo.org/doc/en/ldap-howto.xml#doc_chap2
[...]
>
> access to *
> by dn="uid=root,ou=people,dc=kavach,dc=blr" write
> by users read
> by anonymous auth
>
> access to attrs=userPassword,gecos,description,loginShell
> by self write
Your first access rule makes your second one obsolete, because * is for
everything. Therefore your second rule will never jump in. Take always
the rule with * as your last access rule.
> My /etc/pam.d/system-auth :--
>
> auth required /lib/security/pam_env.so
> auth sufficient /lib/security/pam_unix.so likeauth nullok
> auth sufficient /lib/security/pam_ldap.so use_first_pass
> auth required /lib/security/pam_deny.so
>
> account required /lib/security/pam_unix.so
> account sufficient /lib/security/pam_ldap.so
>
> password required /lib/security/pam_cracklib.so retry=3 minlen=4 dcredit=0 ucredit=0
> password sufficient /lib/security/pam_unix.so nullok use_authtok md5 shadow
> password sufficient /lib/security/pam_ldap.so use_authtok
> password required /lib/security/pam_deny.so
>
> session required /lib/security/pam_limits.so
> session required /lib/security/pam_unix.so
> session optional /lib/security/pam_ldap.so
I'm no expert at all with pam rules, but your rules always have the unix
rule before ldap rule. If you try login with a local account (not in
passwd), than perhaps you run in timeouts?
I have set up ldap on debian with the following pam rules:
auth [success=1 default=ignore] pam_unix.so nullok_secure
auth required pam_ldap.so use_first_pass
auth required pam_permit.so
account [success=1 default=ignore] pam_unix.so
account required pam_ldap.so
account required pam_permit.so
password sufficient pam_ldap.so use_first_pass use_authtok
password required pam_unix.so nullok obscure min=4 max=8 md5
session optional pam_ldap.so
session required pam_unix.so
The first rule of auth and account allows you to login even if ldap is
down: the rules check, if a local account exists; if yes jump to third
rule; if no jump to second rule.
Perhaps this can help you.
> Since my local system is also acting as a LDAP server, thats why every users who are in LDAP directory, they are in my system also.
Hm, this sounds a little bit wrong. Even if your LDAP server runs on
another system, the accounts saved in it are part of your system, if you
configure it that way (which you did with /etc/nsswitch.conf and
/etc/ldap.conf). They are not automatically in it, if you do not set
these files properly (which I think you did), local ldap or not.
Regards,
Marc
--
gentoo-user@gentoo.org mailing list
next parent reply other threads:[~2006-08-28 7:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6O59c-3tf-19@gated-at.bofh.it>
2006-08-28 7:50 ` Marc Blumentritt [this message]
2006-08-28 8:39 ` [gentoo-user] openldap: taking too much of time to authenticate bijayant kumar
[not found] <6OLLb-1fV-9@gated-at.bofh.it>
[not found] ` <6OMQW-3gQ-31@gated-at.bofh.it>
2006-08-28 13:14 ` Marc Blumentritt
[not found] <6OKm9-6IA-35@gated-at.bofh.it>
[not found] ` <6OKYL-874-15@gated-at.bofh.it>
2006-08-28 9:37 ` Marc Blumentritt
2006-08-28 10:47 ` bijayant kumar
2006-08-26 12:06 bijayant kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44F2A05C.8060202@tu-braunschweig.de \
--to=m.blumentritt@tu-braunschweig.de \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox