[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: nsswitch.conf
Linh Huynh£¬ÄúºÃ£¡
ÔÚ 00-8-1 11:32:00 ÄúдµÀ£º
>Hi,
>in
>http://www.redhat.com/support/manuals/RHL-6.2-Manual/ref-guide/s1-ldap-redha
>ttips.html
>is says:
>To use nss_ldap, you'll need to add ldap to the appropriate fields in
>/etc/nsswitch.conf. (Be very careful when editing this file; be sure that
>you know what you're doing.) For example:
>
>passwd: files ldap
>shadow: files ldap
>group: files ldap
>
>but in my file there is:
>passwd: files nisplus nis
>shadow: files nisplus nis
>group: files nisplus nis
>
>Should I just add "ldap" to each line? What more should I do with that file?
>Is there a short answer to this or can someone point me somewhere to read
>about it?
>
>- Linh
There is a nsswitch.ldap file in /usr/doc/nss_ldap-XXX/.
You can use the file as the /etc/nsswitch.conf, but be careful that you will be out of
the system if you make some mistake. If you cannot enter the system, reboot the machine
and enter as single mode. That is type " linux single" when LILO apears. Good luck.
nsswitch.ldap
#########################################################################
#ident $Id: nsswitch.ldap,v 2.3 1999/04/13 22:56:43 lukeh Exp $
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses LDAP conjunction with files.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
# the following two lines obviate the "+" entry in /etc/passwd and /etc/group.
passwd:files ldap
group:files ldap
# consult DNS first, we will need it to resolve the LDAP host. (If we
# can't resolve it, we're in infinite recursion, because libldap calls
# gethostbyname(). Careful!)
hosts:dns ldap
# LDAP is nominally authoritative for the following maps.
services: ldap [NOTFOUND=return] files
networks: ldap [NOTFOUND=return] files
protocols: ldap [NOTFOUND=return] files
rpc: ldap [NOTFOUND=return] files
ethers: ldap [NOTFOUND=return] files
# no support for netmasks, bootparams, publickey yet.
netmasks: files
bootparams: files
publickey: files
automount: files
# I'm pretty sure nsswitch.conf is consulted directly by sendmail,
# here, so we can't do much here. Instead, use bbense's LDAP
# rules ofr sendmail.
aliases: files
sendmailvars: files
# No one has written the LDAP support for netgroups yet, so we'll
# have to stick with NIS.
netgroup: files nis
######################################################################
ÖÂ
Àñ£¡
ÍõÓñͤ
hiwyt@263.net