此内容没有您所选择的语言版本。
4.2. Configuring autofs
- Edit the
/etc/sysconfig/autofsfile to specify the schema attributes that autofs searches for:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Specify the LDAP configuration. There are two ways to do this. The simplest is to let the automount service discover the LDAP server and locations on its own:
LDAP_URI="ldap:///dc=example,dc=com"
LDAP_URI="ldap:///dc=example,dc=com"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, explicitly set which LDAP server to use and the base DN for LDAP searches:LDAP_URI="ldap://ipa.example.com" SEARCH_BASE="cn=location,cn=automount,dc=example,dc=com"
LDAP_URI="ldap://ipa.example.com" SEARCH_BASE="cn=location,cn=automount,dc=example,dc=com"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The default value for location isdefault. If additional locations are added, then the client can be pointed to use those locations, instead. - Edit the
/etc/autofs_ldap_auth.conffile so that autofs allows client authentication with the IPA LDAP server. Changeauthrequiredto yes and set the principal to the Kerberos host principal:Copy to Clipboard Copied! Toggle word wrap Toggle overflow If necessary, runklist -kto get the exact host principal information. - Check the
/etc/nssswitch.conffile, so that LDAP is listed as a source for automount configuration:automount: files ldap
automount: files ldapCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart autofs:
service autofs restart
# service autofs restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Test the configuration by listing a user's
/homedirectory:ls /home/userName
# ls /home/userNameCopy to Clipboard Copied! Toggle word wrap Toggle overflow If this does not mount the remote file system, check the/var/log/messagesfile for errors. If necessary, increase the debug level in the/etc/sysconfig/autofsfile by setting theLOGGINGparameter todebug.
Note
If there are problems with automount, then cross-reference the automount attempts with the 389 Directory Server access logs for the IPA instance, which will show the attempted access, user, and search base.
It is also simple to run automount in the foreground with debug logging on.
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
This prints the debug log information directly, without having to cross-check the LDAP access log with automount's log.
automount -f -d
automount -f -d