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 788625 - IPA nested netgroups not seen from ypcat
Summary: IPA nested netgroups not seen from ypcat
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-08 16:21 UTC by Scott Poore
Modified: 2013-05-21 12:33 UTC (History)
4 users (show)

Fixed In Version: ipa-2.2.0-3.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 13:32:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0819 0 normal SHIPPED_LIVE ipa bug fix and enhancement update 2012-06-19 20:34:17 UTC

Description Scott Poore 2012-02-08 16:21:30 UTC
Description of problem:

With the IPA NIS Listener enabled, I cannot see nested netgroups by running the ypcat command.  

Nested/member netgroups appear to be stored in the member attribute:

# test, ng, alt, example.com
dn: cn=test,cn=ng,cn=alt,dc=example,dc=com
objectClass: ipaobject
objectClass: ipaassociation
objectClass: ipanisnetgroup
cn: test
description: test
nisDomainName: example.com
ipaUniqueID: 7a5b95f4-51ca-11e1-8dcf-5254008ea76d
member: cn=test1,cn=ng,cn=alt,dc=example,dc=com

# test1, ng, alt, example.com
dn: cn=test1,cn=ng,cn=alt,dc=example,dc=com
objectClass: ipaobject
objectClass: ipaassociation
objectClass: ipanisnetgroup
cn: test1
description: test1
nisDomainName: example.com
ipaUniqueID: 7ce62078-51ca-11e1-b7f9-5254008ea76d
memberUser: uid=admin,cn=users,cn=accounts,dc=example,dc=com
memberOf: cn=test,cn=ng,cn=alt,dc=example,dc=com


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

ipa-admintools-2.2.0-101.20120206T0930zgitc080c65.el6.x86_64
ipa-server-2.2.0-101.20120206T0930zgitc080c65.el6.x86_64
389-ds-base-1.2.9.16-1.el6.x86_64
389-ds-base-libs-1.2.9.16-1.el6.x86_64


How reproducible:

always

Steps to Reproduce:
1. <setup IPA server>
2. kinit admin
3. ipa netgroup-add test1 --desc=test1
4. ipa netgroup-add-member test1 --users=admin
5. ipa netgroup-add test --desc=test
6. ipa netgroup-add-member test1 --netgroups=test1
7. ipa-compat-manage enable
8. ipa-nis-manage enable
9. service rpcbind restart
10. service dirsrv restart
11. yum install yp-tools
12. ypcat -d <DOMAIN> -h localhost -k netgroup
  
Actual results:

You see test as an empty netgroup:

# ypcat -d $DOMAIN -h localhost -k netgroup
test 
test1 (-,admin,example.com)


Expected results:

I'd expect to see the netgroup test1 listed as a member of test like this:

# ypcat -d $DOMAIN -h localhost -k netgroup
test test1
test1 (-,admin,example.com)

Additional info:

Comment 1 Scott Poore 2012-02-08 16:45:28 UTC
> From Nalin:
> Try stopping the server, locating the entry in its dse.ldif for
> "nis-domain=testrelm.com+nis-map=netgroup,cn=NIS
> Server,cn=plugins,cn=config",
> and replacing this part of it:
>   "%{memberNisNetgroup}"
> with:
>   "%deref_f(\"member\",\"(objectclass=ipanisNetgroup)\",\"cn\")"
>
> That should correctly pull the names of the member netgroups from
> their
> entries.

Yep, that did the trick:

# ypcat -k -d $DOMAIN -h localhost netgroup
test1 (-,admin,testrelm.com)
test test1

So workaround seems to be:

service dirsrv stop
edit /etc/dirsrv/slapd-<REALM>/dse.ldif 

Change:
<snip>
dn: nis-domain=testrelm.com+nis-map=netgroup,cn=NIS Server,cn=plugins,cn=confi
 g
objectClass: top
objectClass: extensibleObject
nis-value-format: %merge(" ","%{memberNisNetgroup}", </snip>

To:
<snip>
dn: nis-domain=testrelm.com+nis-map=netgroup,cn=NIS Server,cn=plugins,cn=confi
 g
objectClass: top
objectClass: extensibleObject
nis-value-format: %merge(" ","%deref_f(\"member\",\"(objectclass=ipanisNetgrou
<  p)\",\"cn\")", </snip>

Then run:

service dirsrv start

ypcat -d $DOMAIN -h localhost -k netgroup

And you should now see nested netgroups:

# ypcat -k -d $DOMAIN -h localhost netgroup
test1 (-,admin,testrelm.com)
test test1

Thanks.

Comment 3 Dmitri Pal 2012-02-08 20:17:10 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2359

Comment 4 Rob Crittenden 2012-02-29 03:11:12 UTC
Step 6 in the reproduction steps should read:

ipa netgroup-add-member test --netgroups=test1

You'll want to test a fresh installation and an upgrade.

Comment 7 Scott Poore 2012-03-21 15:21:30 UTC
Verified.

Version :: ipa-server-2.2.0-4.el6.x86_64

Automated Test Results :: 

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: netgroup_bz_788625: IPA nested netgroups not seen from ypcat
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'ipa netgroup-add netgroup_bz_788625_test1 --desc=netgroup_bz_788625_test1'
:: [   PASS   ] :: Running 'ipa netgroup-add-member netgroup_bz_788625_test1 --users=admin'
:: [   PASS   ] :: Running 'ipa netgroup-add netgroup_bz_788625_test --desc=netgroup_bz_788625_test'
:: [   PASS   ] :: Running 'ipa netgroup-add-member netgroup_bz_788625_test --netgroups=netgroup_bz_788625_test1'
:: [   PASS   ] :: Running 'echo ******** | ipa-compat-manage enable'
:: [   PASS   ] :: Running 'echo ******** | ipa-nis-manage enable'
:: [   PASS   ] :: Running 'service rpcbind restart'
:: [   PASS   ] :: Running 'service dirsrv restart'
:: [   PASS   ] :: Running 'yum -y install yp-tools'
:: [   PASS   ] :: BZ 788625 not found
:: [   PASS   ] :: Running 'ipa netgroup-del netgroup_bz_788625_test1'
:: [   PASS   ] :: Running 'ipa netgroup-del netgroup_bz_788625_test'
:: [   LOG    ] :: Duration: 46s
:: [   LOG    ] :: Assertions: 12 good, 0 bad
:: [   PASS   ] :: RESULT: netgroup_bz_788625: IPA nested netgroups not seen from ypcat

Manual Test Results ::

# ipa netgroup-add ng788625 --desc=test
-------------------------
Added netgroup "ng788625"
-------------------------
  Netgroup name: ng788625
  Description: test
  NIS domain name: testrelm.com
  IPA unique ID: 4df6b4a2-7368-11e1-a6cd-0019bbea4c2b

# ipa netgroup-add-member ng788625 --users=admin
  Netgroup name: ng788625
  Description: test
  NIS domain name: testrelm.com
  Member User: admin
-------------------------
Number of members added 1
-------------------------

# ipa netgroup-add ng788625_container --desc=container
-----------------------------------
Added netgroup "ng788625_container"
-----------------------------------
  Netgroup name: ng788625_container
  Description: container
  NIS domain name: testrelm.com
  IPA unique ID: 8d19d650-7368-11e1-9ce1-0019bbea4c2b

# ipa netgroup-add-member ng788625_container --netgroups=ng788625
  Netgroup name: ng788625_container
  Description: container
  NIS domain name: testrelm.com
  Member netgroups: ng788625
-------------------------
Number of members added 1
-------------------------

# echo ******** | ipa-compat-manage enable

Plugin already Enabled

# echo ******** | ipa-nis-manage enable

Enabling plugin
This setting will not take effect until you restart Directory Server.
The rpcbind service may need to be started.

# service rpcbind restart
Stopping rpcbind: [  OK  ]
Starting rpcbind: [  OK  ]

# service dirsrv restart
Shutting down dirsrv: 
    PKI-IPA...[  OK  ]
    TESTRELM-COM...[  OK  ]
Starting dirsrv: 
    PKI-IPA...[  OK  ]
    TESTRELM-COM...[  OK  ]

# ypcat -d $DOMAIN -h localhost -k netgroup | grep ^ng788625
ng788625_container ng788625
ng788625 (-,admin,testrelm.com)

Comment 9 Martin Kosek 2012-04-24 11:34:38 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 11 errata-xmlrpc 2012-06-20 13:32:01 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/RHBA-2012-0819.html


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