<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 15, 2014 at 5:03 PM, Rob Crittenden <span dir="ltr"><<a href="mailto:rcritten@redhat.com" target="_blank">rcritten@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Natxo Asenjo wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
hi,<br>
<br>
Centos 6.5.<br>
<br>
I want to create a certificate request for our mysql servers. I came up<br>
with this command line:<br>
<br>
$ sudo /usr/bin/ipa-getcert request -r -f /etc/pki/tls/certs/`hostname<br>
--fqdn`-mysql.crt -k /etc/pki/tls/private/`hostname --fqdn`-mysql.key -D<br>
`dnsdomainname` -U id-kp-serverAuth -K mysql/`hostname --fqdn`<br>
New signing request "20140915132335" added.<br>
<br>
But it gets rejected:<br>
<br>
Request ID '20140915132335':<br>
         status: CA_REJECTED<br>
         ca-error: Server denied our request, giving up: 2100 (RPC<br>
failed at server.  Insufficient access: You need to be a member of the<br>
serviceadmin role to add services).<br>
         stuck: yes<br>
         key pair storage:<br>
type=FILE,location='/etc/pki/<u></u>tls/private/hostname-mysql.<u></u>key'<br>
         certificate:<br>
type=FILE,location='/etc/pki/<u></u>tls/certs/hostname-mysql.crt'<br>
         CA: IPA<br>
         issuer:<br>
         subject:<br>
         expires: unknown<br>
         pre-save command:<br>
         post-save command:<br>
         track: yes<br>
         auto-renew: yes<br>
<br>
I think I have the serviceadmin role:<br>
<br>
$ ipa role-show "it specialist"<br>
   Role name: IT Specialist<br>
   Description: IT Specialist<br>
   Member groups: admins<br>
   Privileges: Host Administrators, Host Group Administrators, Service<br>
               Administrators, Automount Administrators<br>
<br>
The account is member of group admins.<br>
<br>
What am I doing wrong?<br>
</blockquote>
<br></div></div>
ipa-getcert runs using the host credentials, not the current user's. A host cannot add services, even its own. So you need to pre-create the mysql service then run getcert resubmit -i 20140915132335 and IPA should issue the cert.</blockquote><div><br></div><div>Yes! Thanks, I guess I had misunderstood how this should work. Now I have the cert and the key and they are in the right place.<br><br>-- <br></div><div>regards,<br>natxo<br></div><div><br><br></div></div></div></div>