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 1185410 - idoverrideuser-add option --sshpubkey does not work
Summary: idoverrideuser-add option --sshpubkey does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-23 16:43 UTC by Sumit Bose
Modified: 2015-03-05 10:19 UTC (History)
5 users (show)

Fixed In Version: ipa-4.1.0-17.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:19:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0442 0 normal SHIPPED_LIVE Moderate: ipa security, bug fix, and enhancement update 2015-03-05 14:50:39 UTC

Description Sumit Bose 2015-01-23 16:43:42 UTC
Description of problem:
A ssh key cannot be added with idoverrideuser-add:

[root@sideswipe ~]# ipa idoverrideuser-add 'default trust view' aduser1 --uid 960600030 --sshpubkey 'ssh-rsa AAAAAAAAAAAXXXXXXXX root.test'
ipa: ERROR: attribute "ipaSshPubKey" not allowed

Nevertheless it is working as expected with idoverrideuser-mod

Version-Release number of selected component (if applicable):
ipa-4.1.0-15.el7

Comment 1 Martin Kosek 2015-01-26 11:37:12 UTC
This is indeed a bug, I see

        if 'ipasshpubkey' in entry_attrs and 'ipasshuser' not in obj_classes:
            obj_classes.append('ipasshuser')

is only in idoverrideuser_mod command. I will create an upstream bug.

Comment 2 Martin Kosek 2015-01-26 11:39:02 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/4868

Comment 6 Steeve Goveas 2015-01-28 12:04:17 UTC
On Client

[root@ratchet ~]# su - aduser1
-sh-4.2$ bash

[aduser1@ratchet ~]$ ssh-keygen -t rsa -N '' -f /home/adtest.qe/aduser1/.ssh/id_rsa
Generating public/private rsa key pair.
Created directory '/home/adtest.qe/aduser1/.ssh'.
Your identification has been saved in /home/adtest.qe/aduser1/.ssh/id_rsa.
Your public key has been saved in /home/adtest.qe/aduser1/.ssh/id_rsa.pub.
The key fingerprint is:
97:23:4f:c4:66:19:32:57:68:3b:aa:d7:4b:99:92:2e aduser1@ratchet.ipabugs.test
The key's randomart image is:
+--[ RSA 2048]----+
|        o oo.    |
|         =oo     |
|         .*.     |
|         +o.     |
|        S.=.     |
|        .* +     |
|       .o.=      |
|      E..o.      |
|       o. ..     |
+-----------------+

[aduser1@ratchet ~]$ cat .ssh/id_rsa.pub 
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDd3MllNN7FV73WSBcABttKoXiNSgpgg47em7QqwR8Mk9iIIiblfuShXxL35L2iCS9D/hr72bzT1yJD5B+gqmXPIwm+myzBSgAjqtQLVZ15xnyZnQQdUE3lTGhWoX3BuTXqK0m9YfAB9yPiAFYDXNWn+X0UGvAwQat91k0muB4PbinIbY76f5klH5T1gKX5Ih4Zr7YE7xjwnyplB//mduCmZeXSBML43yl+nrFMtS41iYlxwMrIUbZhB3KUw23QQdSSe8EOBTKS+KImUhQXn5crf+mcfhiPSfZZVpA+beAenFkbz1bw7Bkv7bJIDVuRRKmROLW2APYK7HqdlLiXeiYt aduser1@ratchet.ipabugs.test

On Server

[root@sideswipe ~]# ipa idoverrideuser-add 'default trust view' aduser1 --sshpubkey "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDd3MllNN7FV73WSBcABttKoXiNSgpgg47em7QqwR8Mk9iIIiblfuShXxL35L2iCS9D/hr72bzT1yJD5B+gqmXPIwm+myzBSgAjqtQLVZ15xnyZnQQdUE3lTGhWoX3BuTXqK0m9YfAB9yPiAFYDXNWn+X0UGvAwQat91k0muB4PbinIbY76f5klH5T1gKX5Ih4Zr7YE7xjwnyplB//mduCmZeXSBML43yl+nrFMtS41iYlxwMrIUbZhB3KUw23QQdSSe8EOBTKS+KImUhQXn5crf+mcfhiPSfZZVpA+beAenFkbz1bw7Bkv7bJIDVuRRKmROLW2APYK7HqdlLiXeiYt aduser1@ratchet.ipabugs.test"
------------------------------------------
Added User ID override "aduser1"
------------------------------------------
  Anchor to override: aduser1
  SSH public key: ssh-rsa
                  AAAAB3NzaC1yc2EAAAADAQABAAABAQDd3MllNN7FV73WSBcABttKoXiNSgpgg47em7QqwR8Mk9iIIiblfuShXxL35L2iCS9D/hr72bzT1yJD5B+gqmXPIwm+myzBSgAjqtQLVZ15xnyZnQQdUE3lTGhWoX3BuTXqK0m9YfAB9yPiAFYDXNWn+X0UGvAwQat91k0muB4PbinIbY76f5klH5T1gKX5Ih4Zr7YE7xjwnyplB//mduCmZeXSBML43yl+nrFMtS41iYlxwMrIUbZhB3KUw23QQdSSe8EOBTKS+KImUhQXn5crf+mcfhiPSfZZVpA+beAenFkbz1bw7Bkv7bJIDVuRRKmROLW2APYK7HqdlLiXeiYt
                  aduser1@ratchet.ipabugs.test


[root@sideswipe ~]# grep sss_ssh_authorizedkeys /etc/ssh/sshd_config 
AuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys

[root@sideswipe ~]# sss_ssh_authorizedkeys -d ipabugs.test aduser1
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDd3MllNN7FV73WSBcABttKoXiNSgpgg47em7QqwR8Mk9iIIiblfuShXxL35L2iCS9D/hr72bzT1yJD5B+gqmXPIwm+myzBSgAjqtQLVZ15xnyZnQQdUE3lTGhWoX3BuTXqK0m9YfAB9yPiAFYDXNWn+X0UGvAwQat91k0muB4PbinIbY76f5klH5T1gKX5Ih4Zr7YE7xjwnyplB//mduCmZeXSBML43yl+nrFMtS41iYlxwMrIUbZhB3KUw23QQdSSe8EOBTKS+KImUhQXn5crf+mcfhiPSfZZVpA+beAenFkbz1bw7Bkv7bJIDVuRRKmROLW2APYK7HqdlLiXeiYt aduser1@ratchet.ipabugs.test


On Client

[root@ratchet ~]# grep sss_ssh_authorizedkeys /etc/ssh/sshd_config 
AuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys

[root@ratchet ~]# sss_ssh_authorizedkeys -d ipabugs.test aduser1
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDd3MllNN7FV73WSBcABttKoXiNSgpgg47em7QqwR8Mk9iIIiblfuShXxL35L2iCS9D/hr72bzT1yJD5B+gqmXPIwm+myzBSgAjqtQLVZ15xnyZnQQdUE3lTGhWoX3BuTXqK0m9YfAB9yPiAFYDXNWn+X0UGvAwQat91k0muB4PbinIbY76f5klH5T1gKX5Ih4Zr7YE7xjwnyplB//mduCmZeXSBML43yl+nrFMtS41iYlxwMrIUbZhB3KUw23QQdSSe8EOBTKS+KImUhQXn5crf+mcfhiPSfZZVpA+beAenFkbz1bw7Bkv7bJIDVuRRKmROLW2APYK7HqdlLiXeiYt aduser1@ratchet.ipabugs.test


[root@ratchet ~]# su - aduser1
Last login: Wed Jan 28 17:19:08 IST 2015 from ratchet.ipabugs.test on pts/1
-sh-4.2$ klist
klist: Credentials cache keyring 'persistent:1148401313:krb_ccache_Bndbp0R' not found

-sh-4.2$ ssh -l aduser1 sideswipe.ipabugs.test hostname
sideswipe.ipabugs.test

-sh-4.2$ ssh -l aduser1 `hostname` hostname
ratchet.ipabugs.test

Comment 7 Steeve Goveas 2015-01-28 12:05:06 UTC
Verified in version

[root@sideswipe ~]# rpm -q ipa-server sssd
ipa-server-4.1.0-17.el7.x86_64
sssd-1.12.2-52.el7.x86_64

Comment 9 errata-xmlrpc 2015-03-05 10:19:31 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/RHSA-2015-0442.html


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