このコンテンツは選択した言語では利用できません。
2.3. Manually Configuring a Linux Client
The
ipa-client-install command automatically configures services like Kerberos, SSSD, PAM, and NSS. However, if the ipa-client-install command cannot be used on a system for some reason, then the IPA client entries and the services can be configured manually.
- Install SSSD 1.5.x or later, if it is not already installed.
- On an IPA server. Create a host entry for the client.
ipa host-add --force --ip-address=192.168.166.31 client1.example.com
$ ipa host-add --force --ip-address=192.168.166.31 client1.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow - On an IPA server. Create keytabs for the client.
- Log in as IPA; administrator.
kinit admin
$ kinit adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the client host to be managed by the server.
ipa host-add-managedby --hosts=ipaserver.example.com client1.example.com
$ ipa host-add-managedby --hosts=ipaserver.example.com client1.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Generate the keytab for the client.
ipa-getkeytab -s ipaserver.example.com -p host/client1.example.com -k /tmp/client1.keytab
# ipa-getkeytab -s ipaserver.example.com -p host/client1.example.com -k /tmp/client1.keytabCopy to Clipboard Copied! Toggle word wrap Toggle overflow
- Copy the keytab to the client machine and rename it
/etc/krb5.ketab.Note
If there is an existing/etc/krb5.ketabthat should be preserved, the two files can be combined usingktutil. - Set the correct user permissions and, if necessary, SELinux contexts for the
/etc/krb5.ketabfile.chown root:root 0600 system_u:object_r:krb5_keytab_t:s0
chown root:root 0600 system_u:object_r:krb5_keytab_t:s0Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure SSSD by editing the
/etc/sssd/sssd.conffile to point to the IPA domain.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure NSS to use SSSD for passwords, groups, users, and netgroups.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the
/etc/krb5.conffile to point to the IPA KDC.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Update the
/etc/pam.dconfiguration to use thepam_sss.somodules.- For
/etc/pam.d/fingerprint-auth:... account [default=bad success=ok user_unknown=ignore] pam_sss.so ... session optional pam_sss.so
... account [default=bad success=ok user_unknown=ignore] pam_sss.so ... session optional pam_sss.soCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For
/etc/pam.d/system-auth:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For
/etc/pam.d/password-auth:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For
/etc/pam.d/smartcard-auth:... account [default=bad success=ok user_unknown=ignore] pam_sss.so ... session optional pam_sss.so
... account [default=bad success=ok user_unknown=ignore] pam_sss.so ... session optional pam_sss.soCopy to Clipboard Copied! Toggle word wrap Toggle overflow
- Set up NFS to work with Kerberos.
Note
To help troubleshoot potential NFS setup errors, enable debug information in the/etc/sysconfig/nfsfile.RPCGSSDARGS="-vvv" RPCSVCGSSDARGS="-vvv"
RPCGSSDARGS="-vvv" RPCSVCGSSDARGS="-vvv"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - On an IPA server, add an NFS service principal for the NFS client.
ipa service-add nfs/ipaclient.example.com@EXAMPLE
# ipa service-add nfs/ipaclient.example.com@EXAMPLECopy to Clipboard Copied! Toggle word wrap Toggle overflow Note
This must be run from a machine with the ipa-admintools package installed so that theipacommand is available. - On the IPA server, obtain a keytab for the NFS service principal.
ipa-getkeytab -s ipaserver.example.com -p nfs/ipaclient.example.com@EXAMPLE -k /tmp/krb5.keytab
# ipa-getkeytab -s ipaserver.example.com -p nfs/ipaclient.example.com@EXAMPLE -k /tmp/krb5.keytabCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Some versions of the Linux NFS implementation have limited encryption type support. If the NFS server is hosted on a version older than Red Hat Enterprise Linux 5, use the-e des-cbc-crcoption to theipa-getkeytabcommand for any nfs/<FQDN> service keytabs to set up, both on the server and on all clients. This instructs the KDC to generate only DES keys.When using DES keys, all clients and servers that rely on this encryption type need to have theallow_weak_cryptooption enabled in the[libdefaults]section of the/etc/krb5.conffile. Without these configuration changes, NFS clients and servers are unable to authenticate to each other, and attempts to mount NFS filesystems may fail. The client'srpc.gssdand the server'srpc.svcgssddaemons may log errors indicating that DES encryption types are not permitted. - Copy the keytab from the IPA server to the NFS server. For example, if the IPA and NFS servers are on different machines:
scp /tmp/krb5.keytab root@nfs.example.com:/etc/krb5.keytab
# scp /tmp/krb5.keytab root@nfs.example.com:/etc/krb5.keytabCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Copy the keytab from the IPA server to the IPA client. For example:
scp /tmp/krb5.keytab root@client.example.com:/etc/krb5.keytab
# scp /tmp/krb5.keytab root@client.example.com:/etc/krb5.keytabCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the
/etc/exportsfile on the NFS server./ipashare gss/krb5p(rw,no_root_squash,subtree_check,fsid=0)
/ipashare gss/krb5p(rw,no_root_squash,subtree_check,fsid=0)Copy to Clipboard Copied! Toggle word wrap Toggle overflow - On the client, mount the NFS share.
- Always specify the share as nfs_server:/ /mountpoint.
- Use the same
-o secsetting as is used in the/etc/exportsfile for the NFS server.
mount -v -t nfs4 -o sec=krb5p nfs.example.com:/ /mnt/ipashare
[root@client ~]# mount -v -t nfs4 -o sec=krb5p nfs.example.com:/ /mnt/ipashareCopy to Clipboard Copied! Toggle word wrap Toggle overflow