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 1249455

Summary: ipa trust-add failed CIFS server configuration does not allow access to \\pipe\lsarpc
Product: Red Hat Enterprise Linux 7 Reporter: Scott Poore <spoore>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: abokovoy, ksiddiqu, lslebodn, matrix.zj, pvoborni, rcritten, spoore, tbabej
Target Milestone: rcKeywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-4.2.0-4.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 12:04:52 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:
Attachments:
Description Flags
debug logs for samba and httpd error_log none

Description Scott Poore 2015-08-03 03:25:56 UTC
Description of problem:

I'm seeing failures on ipa trust-add.

ipa: ERROR: CIFS server configuration does not allow access to \\pipe\lsarpc


Version-Release number of selected component (if applicable):
ipa-server-4.2.0-3.el7.x86_64
samba-4.2.3-4.el7.x86_64


How reproducible:
always (at least in test 

Steps to Reproduce:
1.  Setup IPA server
2.  Configure DNS resolution between IPA and AD server.  For test purposes, this means setup forwarders on IPA to AD and on AD to IPA.
3.  ipa-adtrust-install
4.  ipa trust-add

Actual results:

Fails with error above.

Expected results:

Adds trust

Additional info:

http error:

[Sun Aug 02 18:41:23.236780 2015] [:error] [pid 27312] ipa: INFO: [jsonserver_kerb] admin: trust_add(u'adtest.qe', trust_type=u'ad', realm_admin=u'Administrator', realm_passwd=u'********', all=False, raw=False, version=u'2.147'): RemoteRetrieveError

Comment 3 Alexander Bokovoy 2015-08-03 06:04:22 UTC
I need samba logs -- set 'log level = 100' in /usr/share/ipa/smb.conf.empty and with 'net conf setparm global "log level" 100' before running the tests, then provide /var/log/samba/* and /var/log/httpd/error_log.

Comment 4 Tomas Babej 2015-08-03 10:32:32 UTC
Additionally, please try if restarting IPA with 'ipactl restart' before establishing the trust does not resolve the issue.

Comment 5 Lukas Slebodnik 2015-08-03 11:50:18 UTC
'ipactl restart' is an expensive operation. It takes a long to restart some services. It might be a good workaround, but it should be fixed in different way.

Comment 6 Scott Poore 2015-08-03 12:33:17 UTC
FYI, I have tried adding ipactl restart after the ipa-adtrust-install.  This didn't seem to change the outcome.  I'm rerunning tests and capturing logs now.  will post soon.

Comment 7 Scott Poore 2015-08-03 17:29:02 UTC
Created attachment 1058815 [details]
debug logs for samba and httpd error_log

Comment 8 Alexander Bokovoy 2015-08-04 14:48:16 UTC
After looking at this with Andreas and Guenther, I think we need to change binding strings to use following scheme:

ncacn_np:host[print] -- for SMB1
ncacn_np:host[smb2,print] -- for SMB@

Using ncacn_ip_tcp is probably not worth it as Samba's client side will try to uppercase 'host' value (cifs/foo.bar.z -> cifs/FOO.BAR.Z) and that one will fail against FreeIPA KDC.

Comment 9 Martin Kosek 2015-08-06 11:41:46 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/5183

Comment 12 Scott Poore 2015-08-12 13:25:45 UTC
Verified.

Version ::
ipa-server-4.2.0-4.el7.x86_64


Results ::

:: [  BEGIN   ] :: Running 'echo Secret123 | ipa trust-add adtest.qe --admin Administrator --password'
--------------------------------------------------
Added Active Directory trust for realm "adtest.qe"
--------------------------------------------------
  Realm name: adtest.qe
  Domain NetBIOS name: ADTEST
  Domain Security Identifier: S-1-5-21-1910160501-511572375-3625658879
  SID blacklist incoming: S-1-5-20, S-1-5-3, S-1-5-2, S-1-5-1, S-1-5-7, S-1-5-6, S-1-5-5, S-1-5-4, S-1-5-9, S-1-5-8, S-1-5-17, S-1-5-16, S-1-5-15, S-1-5-14, S-1-5-13, S-1-5-12, S-1-5-11, S-1-5-10, S-1-3, S-1-2, S-1-1, S-1-0, S-1-5-19, S-1-5-18
  SID blacklist outgoing: S-1-5-20, S-1-5-3, S-1-5-2, S-1-5-1, S-1-5-7, S-1-5-6, S-1-5-5, S-1-5-4, S-1-5-9, S-1-5-8, S-1-5-17, S-1-5-16, S-1-5-15, S-1-5-14, S-1-5-13, S-1-5-12, S-1-5-11, S-1-5-10, S-1-3, S-1-2, S-1-1, S-1-0, S-1-5-19, S-1-5-18
  Trust direction: Trusting forest
  Trust type: Active Directory domain
  Trust status: Established and verified
:: [   PASS   ] :: Command 'echo Secret123 | ipa trust-add adtest.qe --admin Administrator --password' (Expected 0, got 0)

Comment 13 errata-xmlrpc 2015-11-19 12:04:52 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/RHBA-2015-2362.html

Comment 14 matrix 2016-05-01 08:36:06 UTC
Hi,

I got the same error with 

ipa-server-4.2.0-15.el7.x86_64
samba-4.2.3-12.el7_2.x86_64

[Sun May 01 08:27:17.493412 2016] [:error] [pid 32267] ipa: INFO: [jsonserver_session] admin.NET: trust_add(u'examplemedia.net', trust_type=u'ad', realm_admin=u'Administrator', realm_passwd=u'********', all=False, raw=False, version=u'2.156'): RemoteRetrieveError
[Sun May 01 08:35:00.600654 2016] [:error] [pid 32266] ipa: INFO: [jsonserver_session] admin.NET: trust_add(u'examplemedia.net', trust_type=u'ad', realm_admin=u'Administrator', realm_passwd=u'********', all=False, raw=False, version=u'2.156'): RemoteRetrieveError

please help to double confirm it has been fixed.

Comment 15 Petr Vobornik 2016-05-01 17:25:27 UTC
RemoteRetrieveError is relatively general error. It might have a different root cause, see comment 3. If there is an issue I'd suggest to open a new BZ, this one won't be reopened.

Comment 16 Alexander Bokovoy 2016-05-01 18:51:45 UTC
According to the logs Matrix sent me, IPv6 is disabled at the kernel level. This is unsupported configuration, as both FreeIPA and Samba require IPv6 support enabled. For more details see http://www.freeipa.org/page/Active_Directory_trust_setup#IPv6_stack_usage

Comment 17 Lukas Slebodnik 2016-05-02 08:08:02 UTC
(In reply to Alexander Bokovoy from comment #16)
> According to the logs Matrix sent me, IPv6 is disabled at the kernel level.
> This is unsupported configuration, as both FreeIPA and Samba require IPv6
> support enabled. For more details see
> http://www.freeipa.org/page/Active_Directory_trust_setup#IPv6_stack_usage

It's very good that it's documented.but it might be even better to log a warning
if ipv6 is disabled.