Red Hat Bugzilla – Bug 1168916
Extend host-show to add the view attribute in set of default attributes
Last modified: 2015-03-05 05:18:36 EST
Description of problem: No command shows if a view is applied to a host. host-show can be extended to add the view attribute in set of default attributes to make it visible. Version-Release number of selected component (if applicable): ipa-server-4.1.0-10.el7.x86_64 Steps to Reproduce: 1. Add trust 2. create and view and apply it to a host Actual results: None of the below commands show if a view is applied [root@ibm-x3620m3-01 ~]# ipa idview-apply hostview --hosts gizmo.steeve2011.test -------------------------- Applied ID View "hostview" -------------------------- hosts: gizmo.steeve2011.test --------------------------------------------- Number of hosts the ID View was applied to: 1 --------------------------------------------- [root@ibm-x3620m3-01 ~]# ipa idview-show hostview ID View Name: hostview User object overrides: aduser2@adtest.qe [root@ibm-x3620m3-01 ~]# ipa idview-find ------------------ 2 ID Views matched ------------------ ID View Name: Default Trust View Description: Default Trust View for AD users. Should not be deleted. ID View Name: hostview ---------------------------- Number of entries returned 2 ---------------------------- [root@ibm-x3620m3-01 ~]# ipa host-show gizmo.steeve2011.test Host name: gizmo.steeve2011.test Principal name: host/gizmo.steeve2011.test@STEEVE2011.TEST Password: False Keytab: True Managed by: gizmo.steeve2011.test SSH public key fingerprint: A2:7B:EA:56:2E:B7:0D:26:5E:12:66:51:37:5C:1E:49 (ssh-rsa), 2A:49:8A:4C:82:2D:98:7A:EA:6D:13:99:B2:EB:97:71 (ssh-ed25519), 79:C2:74:85:CE:1C:EE:34:22:C9:57:AE:C6:2A:36:3B (ecdsa- sha2-nistp256) [root@ibm-x3620m3-01 ~]# ipa idoverrideuser-show hostview aduser2@adtest.qe Anchor to override: aduser2@adtest.qe User login: user1 UID: 7777 Expected results: Additional info:
Actually there are two commands. first: ipa idview-show viewname --show-hosts or ipa host-show host.name --all The latter has in output: <ipaassignedidview>: cn=viewname,cn=views,cn=accounts,dc=example,dc=com Which is suboptimal. That said, this bug is still valid. The latter output should be normalized(show view name instead of dn), given a label and added to default attributes.
Upstream ticket: https://fedorahosted.org/freeipa/ticket/4774
(In reply to Petr Vobornik from comment #2) > Actually there are two commands. > > first: > ipa idview-show viewname --show-hosts > > or > ipa host-show host.name --all > > The latter has in output: > <ipaassignedidview>: cn=viewname,cn=views,cn=accounts,dc=example,dc=com > Which is suboptimal. > > That said, this bug is still valid. The latter output should be > normalized(show view name instead of dn), given a label and added to default > attributes. Yes, both commands work. Thanks
Fixed upstream master: https://fedorahosted.org/freeipa/changeset/d0a781b9c6911f1875df4b0c7da5e6ae030d36de ipa-4-1: https://fedorahosted.org/freeipa/changeset/b986eb281d038e871cd613bf5a7a21a1456370cc
Verified in version [root@vm-idm-019 ~]# rpm -q ipa-server ipa-server-4.1.0-16.el7.x86_64 [root@vm-idm-019 ~]# ipa idview-apply hostview --hosts bumblebee.ipaviews.test -------------------------- Applied ID View "hostview" -------------------------- hosts: bumblebee.ipaviews.test --------------------------------------------- Number of hosts the ID View was applied to: 1 --------------------------------------------- [root@vm-idm-019 ~]# ipa host-show bumblebee.ipaviews.test Host name: bumblebee.ipaviews.test Principal name: host/bumblebee.ipaviews.test@IPAVIEWS.TEST Assigned ID View: hostview Password: False Keytab: True Managed by: bumblebee.ipaviews.test SSH public key fingerprint: 64:A3:BB:B4:B8:C6:F3:37:A2:28:61:77:9A:80:2D:05 (ssh-ed25519), 56:E2:01:AC:C4:CC:3B:66:98:AA:DD:9F:EB:C4:81:C7 (ssh- rsa), 9E:CF:7E:F6:46:F9:71:08:05:22:BE:13:E4:58:F1:8F (ecdsa-sha2-nistp256)
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/RHSA-2015-0442.html