The following tasks are available for user management in Chef server:
The Chef server includes a command-line utility named chef-server-ctl. This command-line tool is used to start and stop individual services, reconfigure the Chef server, run chef-pedant, and then tail Chef server log files.
Use the user-create
, user-delete
, user-edit
, user-list
and user-show
subcommands to manage users.
The org-create
subcommand is used to create an organization. (The validation key for the organization is returned to STDOUT
when creating an organization with this command.)
Syntax
This subcommand has the following syntax:
$ chef-server-ctl org-create ORG_NAME "ORG_FULL_NAME" (options)
where:
chef
."Chef Software, Inc."
.Options
This subcommand has the following options:
-a USER_NAME
, --association_user USER_NAME
admins
and billing_admins
security groups.-f FILE_NAME
, --filename FILE_NAME
FILE_NAME
instead of printing it to STDOUT
.The org-delete
subcommand is used to delete an organization.
Syntax
This subcommand has the following syntax:
$ chef-server-ctl org-delete ORG_NAME
The org-list
subcommand is used to list all of the organizations currently present on the Chef server.
Syntax
This subcommand has the following syntax:
$ chef-server-ctl org-list (options)
Options
This subcommand has the following options:
-a
, --all-orgs
-w
, --with-uri
The org-show
subcommand is used to show the details for an organization.
Syntax
This subcommand has the following syntax:
$ chef-server-ctl org-show ORG_NAME
Warning
Early RC candidates for the Chef server 12 release named this command org-associate
. This is the same command, with the exception of the --admin
flag, which is added to the command (along with the rename) for the upcoming final release of Chef server 12.
The org-user-add
subcommand is used to add a user to an organization.
Syntax
This subcommand has the following syntax:
$ chef-server-ctl org-user-add ORG_NAME USER_NAME (options)
Options
This subcommand has the following options:
--admin
admins
group.Warning
Early RC candidates for the Chef server 12 release named this command org-disociate
. This is the same command, but renamed for the upcoming final release of Chef server 12.
The org-user-remove
subcommand is used to remove a user from an organization.
Syntax
This subcommand has the following syntax:
$ chef-server-ctl org-user-remove ORG_NAME USER_NAME (options)
The user-create
subcommand is used to create a user. (The validation key for the organization may be returned to STDOUT
when creating a user with this command.)
Syntax
This subcommand has the following syntax:
$ chef-server-ctl user-create USER_NAME FIRST_NAME [MIDDLE_NAME] LAST_NAME EMAIL 'PASSWORD' (options)
Options
This subcommand has the following options:
-f FILE_NAME
, --filename FILE_NAME
STDOUT
.The user-delete
subcommand is used to delete a user.
Syntax
This subcommand has the following syntax:
$ chef-server-ctl user-delete USER_NAME
The user-edit
subcommand is used to edit the details for a user. The data will be made available in the $EDITOR for editing.
Syntax
This subcommand has the following syntax:
$ chef-server-ctl user-edit USER_NAME
The user-list
subcommand is used to view a list of users.
Syntax
This subcommand has the following syntax:
$ chef-server-ctl user-list (options)
Options
This subcommand has the following options:
-w
, --with-uri
The user-show
subcommand is used to show the details for a user.
Syntax
This subcommand has the following syntax:
$ chef-server-ctl user-show USER_NAME (options)
Options
This subcommand has the following options:
-l
, --with-orgs
This section is an alphabetical list of the various user-specific tasks that can be performed when using Chef management console.
To change a user’s password:
Open the Chef management console.
From the drop-down list next to your username, select My Profile.
Under Users, click Change Password.
In the Change Password, enter the old password and then the new password.
When finished, click Change Password.
To invite a user to an organization:
Open the Chef management console.
Click Administration.
Click Organizations.
Click Invite User.
In the Invite User dialog box, enter the Chef server user name for the user to be invited, and then click the Invite button:
After the user accepts the invitation, they will be a member of this organization.
Canceling a pending invite for a user can currently be completed using knife:
As a user that is a member of the admins
group, replace ORGNAME
with your own ORGNAME
and run:
knife raw 'association_requests' -s https://api.opscode.com/organizations/ORGNAME
You may see an empty list or you may see a populated list of invites. No invites looks like this
[ ]
A single invite looks like this
[ { "id": "f6240e73d35b1e3ce3238ab8a5131ccb", "username": "testuser" } ]
To cancel the above pending invite you would run
knife raw -m DELETE 'association_requests/f6240e73d35b1e3ce3238ab8a5131ccb' -s https://api.opscode.com/organizations/ORGNAME
To leave an organization:
Open the Chef management console.
Click Administration.
Click Organizations.
Click Leave Organization.
In the Leave Organization dialog box, confirm that you want to leave the organization, and then click the Leave Organization button:
To remove a user from an organization:
Open the Chef management console.
From the drop-down list next to your username, select My Profile.
Under Users, click Leave Organization.
In the Leave Organization dialog box, confirm that the key should be regenerated and click the Leave Organization button:
Removing a member of the admins
group from an organization requires the user to be removed from the admins
group before they can be removed from the organization:
Open the Chef management console.
Click Administration.
Click Groups.
Select the Groups group.
Select a user to be removed from the Groups group:
Click Remove.
Click Users.
Select a user.
Click Remove from Organization.
To reset a user’s validation key:
Open the Chef management console.
From the drop-down list next to your username, select My Profile.
Under Users, click Reset Key.
In the Reset Key dialog box, confirm that the key should be regenerated and click the Regenerate Key button:
In the Reset Key dialog box, copy the key directly from the dialog box or click the Download button to download the key to your local machine:
To view user account settings:
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs-archive.chef.io/release/server_12-8/server_users.html