Recreate "users" Group

Jeremiah Snapp -

When an important, "system" group like the "users" group gets deleted from a Chef organization things can stop working correctly.

An admin user in the organization can fix this by recreating the "users" group, fixing its permissions and adding all users back into the group. These steps are described in more detail below.

Install knife-acl 1.0.0 into ChefDK.

chef gem install knife-acl

Recreate the "users" group.

knife group create users

Give the "users" group default permissions to everything.

knife acl add group users containers clients read,delete
knife acl bulk add group users clients '.*' read,delete -y

knife acl add group users containers sandboxes create
knife acl add group users containers cookbooks create,read,update,delete
knife acl bulk add group users cookbooks '.*' create,read,update,delete -y

knife acl add group users containers data create,read,update,delete
knife acl bulk add group users data '.*' create,read,update,delete -y

knife acl add group users containers environments create,read,update,delete
knife acl bulk add group users environments '.*' create,read,update,delete -y

knife acl add group users containers nodes create,read,update,delete
knife acl bulk add group users nodes '.*' create,read,update,delete -y

knife acl add group users containers roles create,read,update,delete
knife acl bulk add group users roles '.*' create,read,update,delete -y

Copy the file "add_all_users_to_users_group.rb" attached below to the workstation.

Add all users to the "users" group

knife exec add_all_users_to_users_group.rb

 

Have more questions? Submit a request

Comments

Powered by Zendesk