RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1310877 - [RFE] Support Automatic Renewing of Kerberos Host Keytabs
Summary: [RFE] Support Automatic Renewing of Kerberos Host Keytabs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: SSSD Maintainers
QA Contact: Steeve Goveas
Marc Muehlfeld
URL:
Whiteboard:
Depends On: 1290731 1290761
Blocks: 1359600
TreeView+ depends on / blocked
 
Reported: 2016-02-22 21:10 UTC by Jakub Hrozek
Modified: 2020-05-04 10:53 UTC (History)
13 users (show)

Fixed In Version: sssd-1.14.0-0.1.alpha.el7
Doc Type: Enhancement
Doc Text:
SSSD now supports automatic Kerberos host keytab renewal Previously, the System Security Services Daemon (SSSD) did not support the automatic renewal of Kerberos host keytab files in an Active Directory (AD). In environments that, for security reasons, do not allow using passwords that never expire, the files had to be manually renewed. With this update, SSSD is able to automatically renew Kerberos host keytab files. SSSD checks once per day if the machine account password is older than the configured number of days in the "ad_maximum_machine_account_password_age" parameter of the `/etc/sssd/sssd.conf` file. For details, see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html-single/System-Level_Authentication_Guide/index.html#sssd-auto-keytab-renewal
Clone Of: 1290761
Environment:
Last Closed: 2016-11-04 07:16:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 2083 0 None closed [RFE] Support Automatic Renewing of Kerberos Host Keytabs 2021-02-18 05:55:16 UTC
Red Hat Product Errata RHEA-2016:2476 0 normal SHIPPED_LIVE sssd bug fix and enhancement update 2016-11-03 14:08:11 UTC

Internal Links: 1359600

Comment 1 Mike McCune 2016-03-28 23:37:25 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 5 Niranjan Mallapadi Raghavender 2016-08-17 06:41:18 UTC
Versions:
=========
sssd-krb5-common-1.14.0-21.el7.x86_64
sssd-krb5-1.14.0-21.el7.x86_64
python-sssdconfig-1.14.0-21.el7.noarch
sssd-common-1.14.0-21.el7.x86_64
sssd-common-pac-1.14.0-21.el7.x86_64
sssd-ldap-1.14.0-21.el7.x86_64
sssd-proxy-1.14.0-21.el7.x86_64
sssd-ipa-1.14.0-21.el7.x86_64
sssd-1.14.0-21.el7.x86_64
sssd-client-1.14.0-21.el7.x86_64
sssd-ad-1.14.0-21.el7.x86_64

RHEL Version:
=============
Red Hat Enterprise Linux Server release 7.3 Beta (Maipo)


1. Join system to Windows 2012 R2 using adcli

[root@test-cloud-qe3 ~]# echo 'Secret123' | adcli join --domain=sssdad2012r2.com -U Administrator -v --stdin-password -v
 * Using domain name: sssdad2012r2.com
 * Calculated computer account name from fqdn: TEST-CLOUD-QE3
 * Calculated domain realm from name: SSSDAD2012R2.COM
 * Discovering domain controllers: _ldap._tcp.sssdad2012r2.com
 * Sending netlogon pings to domain controller: ldap://[2620:52:0:83f:408a:ef53:8e36:1348]
 * Sending netlogon pings to domain controller: cldap://10.8.63.41
 * Sending netlogon pings to domain controller: ldap://[2620:52:0:83f:5cc:7b0a:c313:8c37]
 * Sending netlogon pings to domain controller: cldap://10.8.63.40
 * Received NetLogon info from: bsod2-bdc.sssdad2012r2.com
 * Wrote out krb5.conf snippet to /tmp/adcli-krb5-6A1ngg/krb5.d/adcli-krb5-conf-3R0XN8
 * Authenticated as user: Administrator
 * Looked up short domain name: SSSDAD2012R2
 * Using fully qualified name: test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
 * Using domain name: sssdad2012r2.com
 * Using computer account name: TEST-CLOUD-QE3
 * Using domain realm: sssdad2012r2.com
 * Calculated computer account name from fqdn: TEST-CLOUD-QE3
 * Generated 120 character computer password
 * Using keytab: FILE:/etc/krb5.keytab
 * Computer account for TEST-CLOUD-QE3$ does not exist
 * Found well known computer container at: CN=Computers,DC=sssdad2012r2,DC=com
 * Calculated computer account: CN=TEST-CLOUD-QE3,CN=Computers,DC=sssdad2012r2,DC=com
 * Created computer account: CN=TEST-CLOUD-QE3,CN=Computers,DC=sssdad2012r2,DC=com
 * Set computer password
 * Retrieved kvno '2' for computer account in directory: CN=TEST-CLOUD-QE3,CN=Computers,DC=sssdad2012r2,DC=com
 * Modifying computer account: dNSHostName
 * Modifying computer account: userAccountControl
 * Modifying computer account: operatingSystem, operatingSystemVersion, operatingSystemServicePack
 * Modifying computer account: userPrincipalName
 ! Couldn't authenticate with keytab while discovering which salt to use: TEST-CLOUD-QE3$@SSSDAD2012R2.COM: Client 'TEST-CLOUD-QE3$@SSSDAD2012R2.COM' not found in Kerberos database
 * Added the entries to the keytab: TEST-CLOUD-QE3$@SSSDAD2012R2.COM: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/TEST-CLOUD-QE3: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/TEST-CLOUD-QE3: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com: FILE:/etc/krb5.keytab


2. Configure sssd.conf and set maximum machine account password age to 1 day

[sssd]
config_file_version = 2
domains = sssdad2012r2.com
services = nss, pam

[domain/sssdad2012r2.com]
id_provider = ad
auth_provider = ad
access_provider = ad
fallback_homedir = /home/%d/%u
use_fully_qualified_names = True
ad_maximum_machine_account_password_age = 1
ad_machine_account_password_renewal_opts = 300:15
debug_level = 9

3. Restart sssd service 

4. Move the system date on RHEL7.3 and Windows system to 2 days ahead

5. sssd calls adcli to renew machine account 

(Fri Aug 19 02:39:47 2016) [sssd[be[sssdad2012r2.com]]] [ad_machine_account_password_renewal_done] (0x1000): --- adcli output start---
 * Found realm in keytab: SSSDAD2012R2.COM
 * Found computer name in keytab: TEST-CLOUD-QE3
 * Found service principal in keytab: host/TEST-CLOUD-QE3
 * Found service principal in keytab: host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
 * Found host qualified name in keytab: host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
 * Found service principal in keytab: RestrictedKrbHost/TEST-CLOUD-QE3
 * Found service principal in keytab: RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
 * Using fully qualified name: test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
 * Using domain name: sssdad2012r2.com
 * Calculated computer account name from fqdn: TEST-CLOUD-QE3
 * Using domain realm: sssdad2012r2.com
 * Sending netlogon pings to domain controller: ldap://[2620:52:0:83f:5cc:7b0a:c313:8c37]
 * Sending netlogon pings to domain controller: cldap://10.8.63.40
 * Received NetLogon info from: bsod2.sssdad2012r2.com
 * Wrote out krb5.conf snippet to /tmp/adcli-krb5-bgY5ed/krb5.d/adcli-krb5-conf-7lDPSN
 * Authenticated as default/reset computer account: TEST-CLOUD-QE3
 * Looked up short domain name: SSSDAD2012R2
 * Using fully qualified name: test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
 * Using domain name: sssdad2012r2.com
 * Using computer account name: TEST-CLOUD-QE3
 * Using domain realm: sssdad2012r2.com
 * Using fully qualified name: test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
 * Enrolling computer name: TEST-CLOUD-QE3
 * Generated 120 character computer password
 * Using keytab: FILE:/etc/krb5.keytab
 * Found computer account for TEST-CLOUD-QE3$ at: CN=TEST-CLOUD-QE3,CN=Computers,DC=sssdad2012r2,DC=com
 * Retrieved kvno '2' for computer account in directory: CN=TEST-CLOUD-QE3,CN=Computers,DC=sssdad2012r2,DC=com
 * Changed computer password
 * kvno incremented to 3
 * Modifying computer account: userAccountControl
 ! Couldn't set userAccountControl on computer account: CN=TEST-CLOUD-QE3,CN=Computers,DC=sssdad2012r2,DC=com: Insufficient access
 * Updated existing computer account: CN=TEST-CLOUD-QE3,CN=Computers,DC=sssdad2012r2,DC=com
 * Discovered which keytab salt to use
 * Added the entries to the keytab: TEST-CLOUD-QE3$@SSSDAD2012R2.COM: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/TEST-CLOUD-QE3: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/TEST-CLOUD-QE3: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com: FILE:/etc/krb5.keytab
---adcli output end---
(Fri Aug 19 02:39:47 2016) [sssd[be[sssdad2012r2.com]]] [be_ptask_done] (0x0400): Task [AD machine account password renewal]: finished successfully


[root@test-cloud-qe3 ~]# klist -k /etc/krb5.keytab 
Keytab name: FILE:/etc/krb5.keytab
KVNO Principal
---- --------------------------------------------------------------------------
   2 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   2 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   2 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   2 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   2 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   2 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   2 host/TEST-CLOUD-QE3
   2 host/TEST-CLOUD-QE3
   2 host/TEST-CLOUD-QE3
   2 host/TEST-CLOUD-QE3
   2 host/TEST-CLOUD-QE3
   2 host/TEST-CLOUD-QE3
   2 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 RestrictedKrbHost/TEST-CLOUD-QE3
   2 RestrictedKrbHost/TEST-CLOUD-QE3
   2 RestrictedKrbHost/TEST-CLOUD-QE3
   2 RestrictedKrbHost/TEST-CLOUD-QE3
   2 RestrictedKrbHost/TEST-CLOUD-QE3
   2 RestrictedKrbHost/TEST-CLOUD-QE3
   2 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   2 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   3 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   3 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   3 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   3 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   3 TEST-CLOUD-QE3$@SSSDAD2012R2.COM
   3 host/TEST-CLOUD-QE3
   3 host/TEST-CLOUD-QE3
   3 host/TEST-CLOUD-QE3
   3 host/TEST-CLOUD-QE3
   3 host/TEST-CLOUD-QE3
   3 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   3 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   3 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   3 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   3 host/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   3 RestrictedKrbHost/TEST-CLOUD-QE3
   3 RestrictedKrbHost/TEST-CLOUD-QE3
   3 RestrictedKrbHost/TEST-CLOUD-QE3
   3 RestrictedKrbHost/TEST-CLOUD-QE3
   3 RestrictedKrbHost/TEST-CLOUD-QE3
   3 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   3 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   3 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   3 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com
   3 RestrictedKrbHost/test-cloud-qe3.idmqe.lab.eng.bos.redhat.com

Comment 7 errata-xmlrpc 2016-11-04 07:16:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2476.html


Note You need to log in before you can comment on or make changes to this bug.