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 1690920 - [RFE] add option to populate "managed by" computer attribute
Summary: [RFE] add option to populate "managed by" computer attribute
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: adcli
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.3
Assignee: Sumit Bose
QA Contact: shridhar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-20 13:23 UTC by Ondrej
Modified: 2021-11-10 09:24 UTC (History)
9 users (show)

Fixed In Version: adcli-0.8.2-12.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:50:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4453 0 None None None 2021-11-09 19:50:58 UTC

Description Ondrej 2019-03-20 13:23:43 UTC
Description of problem:
It would be nice if one could populate the "managed by" attribute via adcli as well, ideally something like
adcli update|join --managed-by ondrejv

Comment 6 Sumit Bose 2020-06-05 15:00:33 UTC
Moving to RHEL-8, since RFEs are not allowed for RHEL-7 anymore.

Comment 7 Ondrej 2020-06-08 09:26:37 UTC
BTW - any plans for "managed by" attribute in the IPA domain?

Comment 15 shridhar 2021-06-21 08:57:53 UTC
Tested with:
Installed products updated.

Upgraded:
  adcli-0.8.2-12.el8.x86_64                                                                                                                                                                                        

[root@ci-vm-10-0-137- tmp.agRhcHLkkj]# adcli update -C --verbose --domain='ad.baseos.qe' --setattr=managedBy=CN=Amy-admin,OU=TestOU,DC=ad,Dc=baseos,DC=qe
 * Found realm in keytab: AD.BASEOS.QE
 * Found computer name in keytab: CI-VM-10-0-137-
 * Found service principal in keytab: host/CI-VM-10-0-137-
 * Found service principal in keytab: host/ci-vm-10-0-137-.ad.baseos.qe
 * Found host qualified name in keytab: ci-vm-10-0-137-.ad.baseos.qe
 * Found service principal in keytab: RestrictedKrbHost/CI-VM-10-0-137-
 * Found service principal in keytab: RestrictedKrbHost/ci-vm-10-0-137-.ad.baseos.qe
 * Using domain name: ad.baseos.qe
 * Using computer account name: CI-VM-10-0-137-
 * Using domain realm: ad.baseos.qe
 * Discovering domain controllers: _ldap._tcp.ad.baseos.qe
 * Sending NetLogon ping to domain controller: sec-ad1.ad.baseos.qe
 * Sending NetLogon ping to domain controller: sec-ad1.ad.baseos.qe
 * Received NetLogon info from: sec-ad1.ad.baseos.qe
 * Wrote out krb5.conf snippet to /tmp/adcli-krb5-b8A44h/krb5.d/adcli-krb5-conf-mKqs2i
 * Using GSS-SPNEGO for SASL bind
 * Looked up short domain name: AD
 * Looked up domain SID: S-1-5-21-3917357665-4280980005-1639201238
 * Using fully qualified name: ci-vm-10-0-137-.ad.baseos.qe
 * Using domain name: ad.baseos.qe
 * Using computer account name: CI-VM-10-0-137-
 * Using domain realm: ad.baseos.qe
 * Using fully qualified name: ci-vm-10-0-137-.ad.baseos.qe
 * Enrolling computer name: CI-VM-10-0-137-
 * Generated 120 character computer password
 * Using keytab: FILE:/etc/krb5.keytab
 * Found computer account for CI-VM-10-0-137-$ at: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe
 * Retrieved kvno '2' for computer account in directory: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe
 * Password not too old, no change needed
 * Sending NetLogon ping to domain controller: sec-ad1.ad.baseos.qe
 * Sending NetLogon ping to domain controller: sec-ad1.ad.baseos.qe
 * Received NetLogon info from: sec-ad1.ad.baseos.qe
 * Modifying computer account: managedBy
 * Checking RestrictedKrbHost/ci-vm-10-0-137-.ad.baseos.qe
 *    Added RestrictedKrbHost/ci-vm-10-0-137-.ad.baseos.qe
 * Checking RestrictedKrbHost/CI-VM-10-0-137-
 *    Added RestrictedKrbHost/CI-VM-10-0-137-
 * Checking host/ci-vm-10-0-137-.ad.baseos.qe
 *    Added host/ci-vm-10-0-137-.ad.baseos.qe
 * Checking host/CI-VM-10-0-137-
 *    Added host/CI-VM-10-0-137-
[root@ci-vm-10-0-137- tmp.agRhcHLkkj]# ldapsearch -x -h sec-ad1.ad.baseos.qe -D 'cn=Administrator,cn=users,dc=ad,dc=baseos,dc=qe' -w weareawesome2012! -b 'cn=computers,dc=ad,dc=baseos,dc=qe' 'cn=ci-vm-10-0-137-'
# extended LDIF
#
# LDAPv3
# base <cn=computers,dc=ad,dc=baseos,dc=qe> with scope subtree
# filter: cn=ci-vm-10-0-137-
# requesting: ALL
#

# CI-VM-10-0-137-, Computers, ad.baseos.qe
dn: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
objectClass: computer
cn: CI-VM-10-0-137-
description: modified shridhar with updatesdf
distinguishedName: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe
instanceType: 4
whenCreated: 20210621084333.0Z
whenChanged: 20210621085143.0Z
uSNCreated: 1464968
uSNChanged: 1464980
name: CI-VM-10-0-137-
objectGUID:: 7/h9uFBIH0qBKK8FIQLD0A==
userAccountControl: 69632
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 132687386156898014
lastLogoff: 0
lastLogon: 132687386165335504
localPolicyFlags: 0
pwdLastSet: 132687386149866800
primaryGroupID: 515
objectSid:: AQUAAAAAAAUVAAAAYSJ+6SWSKv/WObRh/ckAAA==
accountExpires: 9223372036854775807
logonCount: 2
sAMAccountName: CI-VM-10-0-137-$
sAMAccountType: 805306369
operatingSystem: redhat-linux-gnu
dNSHostName: ci-vm-10-0-137-.ad.baseos.qe
managedBy: CN=Amy-admin,OU=TestOU,DC=ad,DC=baseos,DC=qe
servicePrincipalName: RestrictedKrbHost/ci-vm-10-0-137-.ad.baseos.qe
servicePrincipalName: RestrictedKrbHost/CI-VM-10-0-137-
servicePrincipalName: host/ci-vm-10-0-137-.ad.baseos.qe
servicePrincipalName: host/CI-VM-10-0-137-
objectCategory: CN=Computer,CN=Schema,CN=Configuration,DC=ad,DC=baseos,DC=qe
isCriticalSystemObject: FALSE
dSCorePropagationData: 16010101000000.0Z
lastLogonTimestamp: 132687386161897979
msDS-SupportedEncryptionTypes: 24

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1


[root@ci-vm-10-0-137- tmp.agRhcHLkkj]# adcli delete-computer -C --verbose --domain='ad.baseos.qe' 
 * Found realm in keytab: AD.BASEOS.QE
 * Found computer name in keytab: CI-VM-10-0-137-
 * Found service principal in keytab: host/CI-VM-10-0-137-
 * Found service principal in keytab: host/ci-vm-10-0-137-.ad.baseos.qe
 * Found host qualified name in keytab: ci-vm-10-0-137-.ad.baseos.qe
 * Found service principal in keytab: RestrictedKrbHost/CI-VM-10-0-137-
 * Found service principal in keytab: RestrictedKrbHost/ci-vm-10-0-137-.ad.baseos.qe
 * Using domain name: ad.baseos.qe
 * Using computer account name: CI-VM-10-0-137-
 * Using domain realm: ad.baseos.qe
 * Discovering domain controllers: _ldap._tcp.ad.baseos.qe
 * Sending NetLogon ping to domain controller: sec-ad1.ad.baseos.qe
 * Sending NetLogon ping to domain controller: sec-ad1.ad.baseos.qe
 * Received NetLogon info from: sec-ad1.ad.baseos.qe
 * Wrote out krb5.conf snippet to /tmp/adcli-krb5-rm6mFG/krb5.d/adcli-krb5-conf-ONw30G
 * Using GSS-SPNEGO for SASL bind
 * Looked up short domain name: AD
 * Looked up domain SID: S-1-5-21-3917357665-4280980005-1639201238
 * Using fully qualified name: ci-vm-10-0-137-.ad.baseos.qe
 * Using domain name: ad.baseos.qe
 * Using computer account name: CI-VM-10-0-137-
 * Using domain realm: ad.baseos.qe
 * Using fully qualified name: ci-vm-10-0-137-.ad.baseos.qe
 * Enrolling computer name: CI-VM-10-0-137-
 * Found computer account for CI-VM-10-0-137-$ at: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe
 * Deleted computer account at: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe



[root@ci-vm-10-0-137- tmp.agRhcHLkkj]# adcli join --verbose --description='description added at joining by shridhar' --setattr=managedBy=CN=Administrator,CN=Users,DC=ad,DC=baseos,DC=qe  -U Amy-admin -S ad.baseos.qe
 * Sending NetLogon ping to domain controller: ad.baseos.qe
 * Sending NetLogon ping to domain controller: ad.baseos.qe
 * Received NetLogon info from: sec-ad1.ad.baseos.qe
 * Discovered domain name: ad.baseos.qe
 * Calculated computer account name from fqdn: CI-VM-10-0-137-
 * Calculated domain realm from name: AD.BASEOS.QE
 * Wrote out krb5.conf snippet to /tmp/adcli-krb5-l9LRuQ/krb5.d/adcli-krb5-conf-0BVRXO
Password for Amy-admin.QE: 
 * Authenticated as user: Amy-admin.QE
 * Using GSS-SPNEGO for SASL bind
 * Looked up short domain name: AD
 * Looked up domain SID: S-1-5-21-3917357665-4280980005-1639201238
 * Using fully qualified name: ci-vm-10-0-137-.ad.baseos.qe
 * Using domain name: ad.baseos.qe
 * Using computer account name: CI-VM-10-0-137-
 * Using domain realm: ad.baseos.qe
 * Calculated computer account name from fqdn: CI-VM-10-0-137-
 * Generated 120 character computer password
 * Using keytab: FILE:/etc/krb5.keytab
 * A computer account for CI-VM-10-0-137-$ does not exist
 * Found well known computer container at: CN=Computers,DC=ad,DC=baseos,DC=qe
 * Calculated computer account: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe
 * Encryption type [16] not permitted.
 * Encryption type [23] not permitted.
 * Encryption type [3] not permitted.
 * Encryption type [1] not permitted.
 * Created computer account: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe
 * Sending NetLogon ping to domain controller: ad.baseos.qe
 * Sending NetLogon ping to domain controller: ad.baseos.qe
 * Received NetLogon info from: sec-ad1.ad.baseos.qe
 * Set computer password
 * Retrieved kvno '2' for computer account in directory: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe
 * Modifying computer account: managedBy
 * Checking RestrictedKrbHost/ci-vm-10-0-137-.ad.baseos.qe
 *    Added RestrictedKrbHost/ci-vm-10-0-137-.ad.baseos.qe
 * Checking RestrictedKrbHost/CI-VM-10-0-137-
 *    Added RestrictedKrbHost/CI-VM-10-0-137-
 * Checking host/ci-vm-10-0-137-.ad.baseos.qe
 *    Added host/ci-vm-10-0-137-.ad.baseos.qe
 * Checking host/CI-VM-10-0-137-
 *    Added host/CI-VM-10-0-137-
 * Cleared old entries from keytab: FILE:/etc/krb5.keytab
 * Discovered which keytab salt to use
 * Added the entries to the keytab: CI-VM-10-0-137-$@AD.BASEOS.QE: FILE:/etc/krb5.keytab
 * Cleared old entries from keytab: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/CI-VM-10-0-137-.QE: FILE:/etc/krb5.keytab
 * Cleared old entries from keytab: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/ci-vm-10-0-137-.ad.baseos.qe.QE: FILE:/etc/krb5.keytab
 * Cleared old entries from keytab: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/CI-VM-10-0-137-.QE: FILE:/etc/krb5.keytab
 * Cleared old entries from keytab: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/ci-vm-10-0-137-.ad.baseos.qe.QE: FILE:/etc/krb5.keytab
[root@ci-vm-10-0-137- tmp.agRhcHLkkj]# ldapsearch -x -h sec-ad1.ad.baseos.qe -D 'cn=Administrator,cn=users,dc=ad,dc=baseos,dc=qe' -w weareawesome2012! -b 'cn=computers,dc=ad,dc=baseos,dc=qe' 'cn=ci-vm-10-0-137-' 
# extended LDIF
#
# LDAPv3
# base <cn=computers,dc=ad,dc=baseos,dc=qe> with scope subtree
# filter: cn=ci-vm-10-0-137-
# requesting: ALL
#

# CI-VM-10-0-137-, Computers, ad.baseos.qe
dn: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
objectClass: computer
cn: CI-VM-10-0-137-
description: description added at joining by shridhar
distinguishedName: CN=CI-VM-10-0-137-,CN=Computers,DC=ad,DC=baseos,DC=qe
instanceType: 4
whenCreated: 20210621085626.0Z
whenChanged: 20210621085629.0Z
uSNCreated: 1464986
uSNChanged: 1464992
name: CI-VM-10-0-137-
objectGUID:: 60o43YKSdkmb/baIFzg5Nw==
userAccountControl: 69632
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 132687393887366280
lastLogoff: 0
lastLogon: 132687393895647869
localPolicyFlags: 0
pwdLastSet: 132687393879553509
primaryGroupID: 515
objectSid:: AQUAAAAAAAUVAAAAYSJ+6SWSKv/WObRh/skAAA==
accountExpires: 9223372036854775807
logonCount: 2
sAMAccountName: CI-VM-10-0-137-$
sAMAccountType: 805306369
operatingSystem: redhat-linux-gnu
dNSHostName: ci-vm-10-0-137-.ad.baseos.qe
managedBy: CN=Administrator,CN=Users,DC=ad,DC=baseos,DC=qe
servicePrincipalName: RestrictedKrbHost/ci-vm-10-0-137-.ad.baseos.qe
servicePrincipalName: RestrictedKrbHost/CI-VM-10-0-137-
servicePrincipalName: host/ci-vm-10-0-137-.ad.baseos.qe
servicePrincipalName: host/CI-VM-10-0-137-
objectCategory: CN=Computer,CN=Schema,CN=Configuration,DC=ad,DC=baseos,DC=qe
isCriticalSystemObject: FALSE
dSCorePropagationData: 16010101000000.0Z
lastLogonTimestamp: 132687393892210351
msDS-SupportedEncryptionTypes: 24

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1


marking verified.

Comment 18 errata-xmlrpc 2021-11-09 19:50:53 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 (adcli bug fix and enhancement update), 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/RHBA-2021:4453


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