[chef] How to recover the pivotal user in Chef12 ?


Chronological Thread 
  • From: Fanny Strudel < >
  • To: < >
  • Subject: [chef] How to recover the pivotal user in Chef12 ?
  • Date: Wed, 16 Sep 2015 15:58:19 -0700
  • Organization: VMware

Hello,

I can't find a way to solve my issue so I'm posting here.
I've installed chef12 from scratch and created some users using (replacing by good values of source):

chef-server-ctl user-create USER_NAME FIRST_NAME LAST_NAME EMAIL PASSWORD -f USER_NAME.pem -o ORGANIZATION
chef-server-ctl org-user-add ORGANIZATION USER_NAME --admin

And then, I deleted the initial 'pivotal' user thinking that I did not need it anymore using:

# chef-server-ctl user-delete pivotal

But now I can't create any more users or do any operations:


 chef-server-ctl user-list
ERROR: Failed to authenticate to https://127.0.0.1:443 as pivotal with key /etc/opscode/pivotal.pem
Response: Failed to authenticate as 'pivotal'. Ensure that your node_name and client key are correct.

And if I try with the key I created earlier: permission error (though as admin I thought I could do it).
Same thing with the original admin user:

:~# chef-server-ctl user-list -V -u admin -k /etc/chef-server/admin.pem
INFO: Using configuration from /etc/opscode/pivotal.rb
INFO: HTTP Request Returned 403 Forbidden: error
ERROR: You authenticated successfully to https://127.0.0.1:443 as admin but you are not authorized for this action


Any idea on how to restore this pivotal user ?

Thanks
Fanny



Archive powered by MHonArc 2.6.16.

§