KCLIENT(8) | Maintenance Commands and Procedures | KCLIENT(8) |
kclient - set up a machine as a Kerberos client
/usr/sbin/kclient [-n] [-R realm] [-k kdc] [-a adminuser]
[-c filepath] [-d dnsarg] [-f fqdn_list] [-h logical_host_name]
[-k kdc_list] [-m master_kdc] [-p profile] [-s pam_service]
[-T kdc_vendor]
By specifying the various command options, you can use the kclient utility to:
The kclient utility needs to be run on the client machine with root permission and can be run either interactively or non-interactively. In the non-interactive mode, the user feeds in the required inputs by means of a profile, command-line options, or a combination of profile and command-line options. The user is prompted for "required" parameter values (realm and adminuser), if found missing in the non-interactive run. The interactive mode is invoked when the utility is run without any command-line arguments.
Both the interactive and non-interactive forms of kclient can add the host/fqdn entry to the local host's keytab file. They also can require the user to enter the password for the administrative user requested, to obtain the Kerberos Ticket Granting Ticket (TGT) for adminuser. The host/fqdn, nfs/fqdn, and root/fqdn principals can be added to the KDC database (if not already present) before their possible addition to the local host's keytab.
The kclient utility assumes that the local host has been setup for DNS and requires the presence of a valid resolv.conf(5). Also, kclient can fail if the localhost time is not synchronized with that of the KDC. For Kerberos to function the localhost time must be within five minutes of that of the KDC. It is advised that both systems run some form of time synchronization protocol, such as the Network Time Protocol (NTP). See the ntpd man page, delivered in the SUNWntpu package (not a SunOS man page).
The non-interactive mode supports the following options:
-n
-R [ realm ]
-k kdc_list
-a [ adminuser ]
-T kdc_vendor
ms_ad
mit
heimdal
shishi
Knowing the administrative password will be required to associate the client with the server if the ms_ad option is specified.
-c [ filepath ]
-d [ dnsarg ]
-D domain_list
-K
-f [ fqdn_list ]
fqdn_list is a comma-separated list of one or more fully qualified DNS domain names.
This option is especially useful in Kerberos realms having systems offering kerberized services, but situated in multiple different DNS domains.
-h logical_host_name
-m master_kdc
-p [ profile ]
The profile should have entries in the format:
PARAM <value>
Valid PARAM entries are: REALM, KDC, ADMIN, FILEPATH, NFS, DNSLOOKUP, FQDN, NOKEY, NOSOL, LHN, KDCVENDOR, RMAP, MAS, and PAM.
These profile entries correspond to the -R [realm], -k [kdc], -a [adminuser], -c [filepath], -n, -d [dnsarg], -f [fqdn_list], -K, -h [logical_host_name], -T [kdc_vendor], -D [domain_list], -m [master_kdc], and -s [pam_service] command-line options, respectively. Any other PARAM entry is considered invalid and is ignored.
The NFS profile entry can have a value of 0 (do nothing) or 1 (operation is requested). Any other value is considered invalid and is ignored.
Keep in mind that the command line options override the PARAM values listed in the profile.
-s pam_service
Example 1 Setting Up a Kerberos Client Using Command-Line Options
To setup a Kerberos client using the clntconfig/admin administrative principal for realm 'EXAMPLE.COM', kdc `example1.example.com' and that also does kerberized NFS, enter:
# /usr/sbin/kclient -n -R EXAMPLE.COM -k example1.example.com -a clntconfig
Alternatively, to set up a Kerberos client using the clntconfig/admin administrative principal for the realm `EAST.EXAMPLE.COM', kdc `example2.east.example.com' and that also needs service principal(s) created and/or added to the local keytab for multiple DNS domains, enter:
# /usr/sbin/kclient -n -R EAST.EXAMPLE.COM -k example2.east.example.com \ -f west.example.com,central.example.com -a clntconfig
Note that the krb5 administrative principal used by the administrator needs to have only add, inquire, change-pwd and modify privileges (for the principals in the KDC database) in order for the kclient utility to run. A sample kadm5.acl(5) entry is:
clntconfig/admin@EXAMPLE.COM acmi
Example 2 Setting Up a Kerberos Client Using the Profile Option
To setup a Kerberos client using the clntconfig/admin administrative principal for realm `EXAMPLE.COM', kdc `example1.example.com' and that also copies over the master krb5.conf from a specified location, enter:
# /usr/sbin/kclient -p /net/example1.example.com/export/profile.krb5
The contents of profile.krb5:
REALM EXAMPLE.COM KDC example1.example.com ADMIN clntconfig FILEPATH /net/example1.example.com/export/krb5.conf NFS 0 DNSLOOKUP none
Example 3 Setting Up a Kerberos Client That Has a Dynamic IP Address
In this example a Kerberos client is a DHCP client that has a dynamic IP address. This client does not wish to host any Kerberized services and therefore does not require a keytab (/etc/krb5/krb5.keytab) file.
For this type of client the administrator would issue the following command to configure this machine to be a Kerberos client of the EXAMPLE.COM realm with the KDC server kdc1.example.com:
# /usr/sbin/kclient -K -R EXAMPLE.COM -k kdc1.example.com
/etc/krb5/kadm5.acl
/etc/krb5/krb5.conf
/etc/krb5/krb5.keytab
/etc/nfssec.conf
/etc/resolv.conf
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Committed |
encrypt(1), ksh93(1), ldapdelete(1), ldapmodify(1), ldapsearch(1), kadm5.acl(5), krb5.conf(5), nfssec.conf(5), pam.conf(5), resolv.conf(5), attributes(7), pam_krb5(7), dd(8), smbadm(8)
fqdn stands for the Fully Qualified Domain Name of the local host. The kclient utility saves copies of both the krb5.conf(5) and nfssec.conf(5) files to files with corresponding names and .sav extensions. The optional copy of the krb5.conf(5) master file is neither encrypted nor integrity-protected and it takes place over regular NFS.
November 22, 2021 | OmniOS |