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 1218926 - Samba ignores default_keytab_name in krb5.conf
Summary: Samba ignores default_keytab_name in krb5.conf
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: samba
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.3
Assignee: Andreas Schneider
QA Contact: Andrej Dzilský
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-06 08:03 UTC by Ondrej
Modified: 2020-09-10 09:23 UTC (History)
7 users (show)

Fixed In Version: samba-4.6.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 18:19:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1950 0 normal SHIPPED_LIVE Low: samba security, bug fix, and enhancement update 2017-08-01 18:09:24 UTC

Description Ondrej 2015-05-06 08:03:14 UTC
Description of problem:
[root@rh6laptop ~]# cat /etc/krb5.conf
...
[libdefaults]
 default_keytab_name = FILE:/var/lib/samba/krb5.keytab
...

[root@rh6laptop ~]# cat /etc/samba/smb.conf 
...
    kerberos method = system keytab

When I do "net ads join", the real location of the system keytab file (var/lib/samba/krb5.keytab) is being ignored. Samba still tries to use /etc/krb5.keytab

tested with samba-common-3.6.23-14.el6_6.x86_64

Comment 4 Andrej Dzilský 2017-04-27 13:38:45 UTC
I am not able to reproduce this Bug :/ on 3.6.23-14.el6_6.x86_64, it works for me pretty good there.
Also it works on current version of Samba (4.6.0+) too.

I will appreciate any info for testing to get this bug verified.

Comment 5 Ondrej 2017-04-27 14:42:24 UTC
I can still reproduce this bug on samba-common-3.6.23-42.el6_9.x86_64 using the steps above.
Samba still ignores default_keytab_name setting in /etc/krb5.conf

Comment 7 Ondrej 2017-04-28 07:15:05 UTC
Which other info shall I provide?
The steps to reproduce are still the same - "net ads join" keeps creating krb5.keytab file in it's default location (/etc) even if a different location (say /var/lib/samba) is specified in /etc/krb5.conf

Comment 8 Andrej Dzilský 2017-04-28 09:54:34 UTC
Well. Let's start with:

rpm -qa | grep samba
cat /etc/samba/smb.conf
cat /etc/krb5.conf

also run 'net ads join' with parameter '-d10' and attach the log, (e.g. 'net ads join -d10 &> log.join') 

Can I ask you if u entered just 'net ads join' without any parameters or ?

I'd like to find that little detail which prevents me to reproduce bug.

Regards.

Comment 12 Andreas Schneider 2017-05-08 16:45:09 UTC
> Which other info shall I provide?
> The steps to reproduce are still the same - "net ads join" keeps creating
> krb5.keytab file in it's default location (/etc) even if a different location
> (say /var/lib/samba) is specified in /etc/krb5.conf

See 'dedicated keytab' in 'man smb.conf'.

Comment 13 Ondrej 2017-05-09 08:17:39 UTC
Does not work either, unfortunately.
When I add:
    kerberos method = dedicated keytab
    dedicated keytab file = /var/lib/samba/krb5.keytab

and then "net ads join", krb5.keytab file is never created.

Comment 14 Andreas Schneider 2017-05-09 08:36:04 UTC
You need to call 'net ads keytab create'.

Comment 15 Ondrej 2017-05-09 09:17:17 UTC
When I call 'net ads keyteb create -U admin', krb5.keytab is still created in /etc, ignoring settings in both /etc/krb5.conf and /etc/samba/smb.conf

Comment 16 Ondrej 2017-05-09 11:51:45 UTC
Created RedHat support case #01845954 to support this

Comment 17 Andrej Dzilský 2017-05-22 10:28:05 UTC
Kerberos method with 'dedicated keytab' works on samba 4.6.0 too.

Comment 18 errata-xmlrpc 2017-08-01 18:19:59 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://access.redhat.com/errata/RHSA-2017:1950


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