Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1218926 - Samba ignores default_keytab_name in krb5.conf
Samba ignores default_keytab_name in krb5.conf
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: samba (Show other bugs)
7.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 7.3
Assigned To: Andreas Schneider
Andrej Dzilský
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-06 04:03 EDT by Ondrej
Modified: 2017-08-01 14:19 EDT (History)
7 users (show)

See Also:
Fixed In Version: samba-4.6.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 14:19:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1950 normal SHIPPED_LIVE Low: samba security, bug fix, and enhancement update 2017-08-01 14:09:24 EDT

  None (edit)
Description Ondrej 2015-05-06 04:03:14 EDT
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 09:38:45 EDT
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 10:42:24 EDT
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 03:15:05 EDT
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 05:54:34 EDT
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 12:45:09 EDT
> 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 04:17:39 EDT
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 04:36:04 EDT
You need to call 'net ads keytab create'.
Comment 15 Ondrej 2017-05-09 05:17:17 EDT
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 07:51:45 EDT
Created RedHat support case #01845954 to support this
Comment 17 Andrej Dzilský 2017-05-22 06:28:05 EDT
Kerberos method with 'dedicated keytab' works on samba 4.6.0 too.
Comment 18 errata-xmlrpc 2017-08-01 14:19:59 EDT
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.