Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1485417

Summary: Add support for samba by writing the machine account password and the domain SID to Samba's tdbs
Product: Red Hat Enterprise Linux 6 Reporter: Sumit Bose <sbose>
Component: adcliAssignee: Varun Mylaraiah <mvarun>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact: Lucie Vařáková <lmanasko>
Priority: unspecified    
Version: 6.9CC: enewland, fhanzelk, jkurik, lmanasko, mvarun, nsoman, ondrej.valousek.xm, pcech, pkis, sbose, villapla
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: adcli-0.8.1-2.el6 Doc Type: Release Note
Doc Text:
New `adcli` feature for Samba added A new `adcli` feature has been added to the Samba suite. The feature can add a machine account password and the domain security identifier (SID) to Samba's internal TDB database when joining an Active Directory (AD) domain. It allows the Red Hat Enterprise Linux (RHEL) 6 systems with the SMB1 protocol disabled to join AD with the *net ads join* utility.
Story Points: ---
Clone Of:
: 1593240 (view as bug list) Environment:
Last Closed: 2018-06-19 05:20:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1504542, 1593240    
Attachments:
Description Flags
Verification Console output none

Description Sumit Bose 2017-08-25 15:53:17 UTC
Description of problem:
More and more environment will drop support for SMB1 and Samba's 'net ads join ...' command to join an AD domain requires SMB1.

If SMB1 is disabled in an AD domain a RHEL6 client cannot be joined to the domain anymore with 'net ads join ....' Luckily adcli can be used to join the domain because adcli only uses LDAP and Kerberos and does not depend on SMB1.

But unfortunately Samba requires some extra settings which are done by 'net ads join ...' but currently not by adcli. Those are mainly writing the clear text machine account password and the domain SID to specific tdb databases with a specific key.

Instead of fixing 'net ads join ...' which would be a major effort since the version of Samba used in RHEL6 is unsupported by upstream since years, it would be easier to allow adcli to call 'net changesecretpw' and 'net setlocalsid' to set the machine account password and the domain SID repectively.

Comment 4 Sumit Bose 2018-02-20 10:31:27 UTC
Steps to verify:

The goal here is to allow Samba to run as a domain member after joining with adcli instead of 'net ads join'. For this you have to create a minimal smb.conf as e.g. described in https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Domain_Member#Setting_up_a_Basic_smb.conf_File (please make sure 'workgroup' and 'realm' does match your setup).

Then call adcli to join the AD domain with the new option '--add-samba-data'. After a successful join winbindd should start without issues.

As a shortcut you can check with tdbdump from the tdb-tools package that before the join /var/lib/samba/private/secrets.tdb is empty and after the join contains the domain SID and the machine account password.

Comment 7 Varun Mylaraiah 2018-04-16 16:39:44 UTC
Created attachment 1422650 [details]
Verification Console output

Verified
[root@vm-idm-003 ~]# rpm -qa adcli
adcli-0.8.1-2.el6.x86_64


[root@vm-idm-003 ~]# adcli join ipaad2016.test --add-samba-data
Password for Administrator: 


[root@vm-idm-003 ~]# tdbdump  /var/lib/samba/private/secrets.tdb
{
key(42) = "SECRETS/MACHINE_SEC_CHANNEL_TYPE/IPAAD2016"
data(4) = "\02\00\00\00"
}
{
key(42) = "SECRETS/MACHINE_LAST_CHANGE_TIME/IPAAD2016"
data(4) = "\D3\CE\D4Z"
}
{
key(34) = "SECRETS/MACHINE_PASSWORD/IPAAD2016"
data(121) = "Rxq9GtoA_SMCw7[j9p1nRhn^poB=ojnAD1&RSE.mgL2AJ7Ji\5C#;8ISR^2KL45Ou29ab@A-[U4gN-8DFQuw[+[t>sd?PgtCEKM^9buJ8tt#WYXCUv#6GbD1+=\00"
}
{
key(21) = "SECRETS/SID/IPAAD2016"
data(68) = "\01\04\00\00\00\00\00\05\15\00\00\007\16w0\C3&v\DEq\D61_\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
}

Comment 12 errata-xmlrpc 2018-06-19 05:20:03 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/RHEA-2018:1902