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 868419 - samba4 smb and winbind init scripts missing export KRB5CCNAME
Summary: samba4 smb and winbind init scripts missing export KRB5CCNAME
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: samba4
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andreas Schneider
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-19 19:22 UTC by Scott Poore
Modified: 2013-02-21 08:36 UTC (History)
1 user (show)

Fixed In Version: samba4-4.0.0-38.el6.rc3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:36:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0506 0 normal SHIPPED_LIVE Moderate: samba4 security, bug fix and enhancement update 2013-02-20 21:30:25 UTC

Description Scott Poore 2012-10-19 19:22:53 UTC
Description of problem:

Per Dev, /etc/init.d/smb and /etc/init.d/winbind should have:

export KRB5CCNAME

after KRB5CCNAME is set.  

Without this, I am seeing the default kerberos principal switching to cifs/<hostname>@<RELM> occassionally and after running ipactl restart.

Version-Release number of selected component (if applicable):

[root@rhel6-1 httpd]# rpm -qf /etc/init.d/smb
samba4-4.0.0-36.el6.rc3.x86_64

[root@rhel6-1 httpd]# rpm -qf /etc/init.d/winbind
samba4-winbind-4.0.0-36.el6.rc3.x86_64

How reproducible:
always

Steps to Reproduce:
1.  Install IPA Master
2.  run ipa-adtrust-install
3.  kinit admin
4.  klist
5.  ipactl restart
6.  klist
  
Actual results:
After the ipactl restart, see default principal changed to cifs.

Expected results:
default principal should remain admin.

Additional info:

Comment 3 Scott Poore 2012-11-08 17:36:34 UTC
Verified.

Version ::

samba4-4.0.0-44.el6.rc4.x86_64

Manual Test Results ::

[root@rhel6-1 ~]# grep KRB5CCNAME /etc/init.d/*
/etc/init.d/smb:KRB5CCNAME=/var/run/samba/krb5cc_samba
/etc/init.d/smb:export KRB5CCNAME
/etc/init.d/winbind:KRB5CCNAME=/var/run/samba/krb5cc_samba
/etc/init.d/winbind:export KRB5CCNAME

[root@rhel6-1 ~]# ipa-adtrust-install

The log file for this installation can be found in /var/log/ipaserver-install.log
==============================================================================
This program will setup components needed to establish trust to AD domains for
the FreeIPA Server.

This includes:
  * Configure Samba
  * Add trust related objects to FreeIPA LDAP server

To accept the default shown in brackets, press the Enter key.

IPA generated smb.conf detected.
Overwrite smb.conf? [no]: yes

The following operations may take some minutes to complete.
Please wait until the prompt is returned.

Enter the NetBIOS name for the IPA domain.
Only up to 15 uppercase ASCII letters and digits are allowed.
Example: EXAMPLE.


NetBIOS domain name [TESTRELM]: 

Configuring cross-realm trusts for IPA server requires password for user 'admin'.
This user is a regular system account used for IPA server administration.

admin password: 

Configuring CIFS
  [1/18]: stopping smbd
  [2/18]: creating samba domain object
  [3/18]: creating samba config registry
  [4/18]: writing samba config file
  [5/18]: adding cifs Kerberos principal
  [6/18]: adding cifs principal to S4U2Proxy targets
cifs principal already targeted, nothing to do.
  [7/18]: adding admin(group) SIDs
Admin SID already set, nothing to do
Admin group SID already set, nothing to do
  [8/18]: adding RID bases
RID bases already set, nothing to do
  [9/18]: updating Kerberos config
'dns_lookup_kdc' already set to 'true', nothing to do.
  [10/18]: activating CLDAP plugin
CLDAP plugin already configured, nothing to do
  [11/18]: activating sidgen plugin and task
Sidgen plugin already configured, nothing to do
Sidgen task plugin already configured, nothing to do
  [12/18]: activating extdom plugin
Extdom plugin already configured, nothing to do
  [13/18]: configuring smbd to start on boot
  [14/18]: adding special DNS service records
  [15/18]: restarting Directory Server to take MS PAC and LDAP plugins changes into account
  [16/18]: adding fallback group
Fallback group already set, nothing to do
  [17/18]: setting SELinux booleans
  [18/18]: starting CIFS services
Done configuring CIFS.

=============================================================================
Setup complete

You must make sure these network ports are open:
	TCP Ports:
	  * 138: netbios-dgm
	  * 139: netbios-ssn
	  * 445: microsoft-ds
	UDP Ports:
	  * 138: netbios-dgm
	  * 139: netbios-ssn
	  * 389: (C)LDAP
	  * 445: microsoft-ds

Additionally you have to make sure the FreeIPA LDAP server is not reachable
by any domain controller in the Active Directory domain by closing down
the following ports for these servers:
	TCP Ports:
	  * 389, 636: LDAP/LDAPS

You may want to choose to REJECT the network packets instead of DROPing
them to avoid timeouts on the AD domain controllers.

=============================================================================

[root@rhel6-1 ~]# kinit admin
Password for admin: 

[root@rhel6-1 ~]# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: admin

Valid starting     Expires            Service principal
11/08/12 12:33:27  11/09/12 12:33:25  krbtgt/TESTRELM.COM

[root@rhel6-1 ~]# ipactl restart
Restarting Directory Service
Shutting down dirsrv: 
    PKI-IPA...                                             [  OK  ]
    TESTRELM-COM...                                        [  OK  ]
Starting dirsrv: 
    PKI-IPA...                                             [  OK  ]
    TESTRELM-COM...                                        [  OK  ]
Restarting krb5kdc Service
Stopping Kerberos 5 KDC:                                   [  OK  ]
Starting Kerberos 5 KDC:                                   [  OK  ]
Restarting kadmin Service
Stopping Kerberos 5 Admin Server:                          [  OK  ]
Starting Kerberos 5 Admin Server:                          [  OK  ]
Restarting named Service
Stopping named: .                                          [  OK  ]
Starting named:                                            [  OK  ]
Restarting ipa_memcached Service
Stopping ipa_memcached:                                    [  OK  ]
Starting ipa_memcached:                                    [  OK  ]
Restarting httpd Service
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Restarting pki-cad Service
Stopping pki-ca:                                           [  OK  ]
Starting pki-ca:                                           [  OK  ]
Restarting smb Service
Shutting down SMB services:                                [  OK  ]
Starting SMB services:                                     [  OK  ]
Restarting winbind Service

Shutting down Winbind services:                            [  OK  ]
Starting Winbind services:                                 [  OK  ]

[root@rhel6-1 ~]# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: admin

Valid starting     Expires            Service principal
11/08/12 12:33:27  11/09/12 12:33:25  krbtgt/TESTRELM.COM

So, principal didn't switch to cifs and exports seen in init scripts so looks fixed to me.

Comment 4 errata-xmlrpc 2013-02-21 08:36:47 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.

http://rhn.redhat.com/errata/RHSA-2013-0506.html


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