Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = gerrit set-account |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 2 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3 | == NAME |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 4 | gerrit set-account - Change an account's settings. |
| 5 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6 | == SYNOPSIS |
Michael Ochmann | e2d76a1 | 2016-06-23 17:07:37 +0200 | [diff] [blame] | 7 | [verse] |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 8 | -- |
Michael Ochmann | e2d76a1 | 2016-06-23 17:07:37 +0200 | [diff] [blame] | 9 | _ssh_ -p <port> <host> _gerrit set-account_ |
| 10 | [--full-name <FULLNAME>] [--active|--inactive] |
| 11 | [--add-email <EMAIL>] [--delete-email <EMAIL> | ALL] |
| 12 | [--preferred-email <EMAIL>] |
| 13 | [--add-ssh-key - | <KEY>] |
| 14 | [--delete-ssh-key - | <KEY> | ALL] |
Richard Christie | efa38be | 2018-06-28 12:33:51 +0100 | [diff] [blame] | 15 | [--generate-http-password] |
Michael Ochmann | e2d76a1 | 2016-06-23 17:07:37 +0200 | [diff] [blame] | 16 | [--http-password <PASSWORD>] |
| 17 | [--clear-http-password] <USER> |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 18 | -- |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 19 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 20 | == DESCRIPTION |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 21 | Modifies a given user's settings. This command can be useful to |
Peter Jönsson | e402ea7 | 2012-09-04 22:09:29 +0200 | [diff] [blame] | 22 | deactivate an account, set HTTP password, add/delete ssh keys without |
| 23 | going through the UI. |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 24 | |
| 25 | It also allows managing email addresses, which bypasses the |
| 26 | verification step we force within the UI. |
| 27 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 28 | == ACCESS |
Richard Christie | 2a29838 | 2018-06-28 13:08:44 +0100 | [diff] [blame] | 29 | Users can call this to update their own accounts. To update a different |
| 30 | account, a caller must be a member of the privileged 'Administrators' |
| 31 | group, or have been granted |
David Ostrovsky | aa49e27 | 2014-07-22 00:55:47 +0200 | [diff] [blame] | 32 | link:access-control.html#capability_modifyAccount[the 'Modify Account' global capability]. |
David Ostrovsky | c055d46 | 2014-08-22 08:20:59 +0200 | [diff] [blame] | 33 | For security reasons only the members of the privileged 'Administrators' |
| 34 | group can add or delete SSH keys for a user. |
David Ostrovsky | aa49e27 | 2014-07-22 00:55:47 +0200 | [diff] [blame] | 35 | |
David Ostrovsky | db8dfae | 2014-07-23 02:38:32 +0200 | [diff] [blame] | 36 | To set the HTTP password for the user account (option --http-password) or |
| 37 | to clear the HTTP password (option --clear-http-password) caller must be |
Khai Do | cf9bce2 | 2014-09-25 13:59:28 -0700 | [diff] [blame] | 38 | a member of the privileged 'Administrators' group. |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 39 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 40 | == SCRIPTING |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 41 | This command is intended to be used in scripts. |
| 42 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 43 | == OPTIONS |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 44 | <USER>:: |
| 45 | Required; Full name, email-address, SSH username or account id. |
| 46 | |
| 47 | --full-name:: |
David Pursehouse | 9c03255 | 2014-07-22 16:23:08 +0900 | [diff] [blame] | 48 | Set the display name for the user account. |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 49 | + |
| 50 | Names containing spaces should be quoted in single quotes ('). |
| 51 | This most likely requires double quoting the value, for example |
| 52 | `--full-name "'A description string'"`. |
| 53 | |
| 54 | --active:: |
| 55 | Set the account state to be active. |
| 56 | |
| 57 | --inactive:: |
| 58 | Set the account state to be inactive. This prevents the |
| 59 | user from logging in. |
| 60 | |
| 61 | --add-email:: |
| 62 | Add another email to the user's account. This doesn't |
| 63 | trigger the mail validation and adds the email directly |
| 64 | to the user's account. |
| 65 | May be supplied more than once to add multiple emails to |
| 66 | an account in a single command execution. |
| 67 | |
| 68 | --delete-email:: |
| 69 | Delete an email from this user's account if it exists. |
| 70 | If the email provided is 'ALL', all associated emails are |
| 71 | deleted from this account. |
David Pursehouse | 34f784a | 2015-05-12 14:02:41 +0900 | [diff] [blame] | 72 | May be supplied more than once to remove multiple emails |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 73 | from an account in a single command execution. |
| 74 | |
Khai Do | 635160f | 2014-07-23 14:50:49 -0700 | [diff] [blame] | 75 | --preferred-email:: |
| 76 | Sets the preferred email address for the user's account. |
| 77 | The email address must already have been registered |
| 78 | with the user's account before it can be set. |
| 79 | May be supplied with the delete-email option as long as |
| 80 | the emails are not the same. |
| 81 | |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 82 | --add-ssh-key:: |
| 83 | Content of the public SSH key to add to the account's |
| 84 | keyring. If `-` the key is read from stdin, rather than |
| 85 | from the command line. |
| 86 | May be supplied more than once to add multiple SSH keys |
| 87 | in a single command execution. |
| 88 | |
| 89 | --delete-ssh-key:: |
| 90 | Content of the public SSH key to remove from the account's |
| 91 | keyring or the comment associated with this key. |
| 92 | If `-` the key is read from stdin, rather than from the |
| 93 | command line. If the key provided is 'ALL', all |
| 94 | associated SSH keys are removed from this account. |
| 95 | May be supplied more than once to delete multiple SSH |
| 96 | keys in a single command execution. |
| 97 | |
Richard Christie | efa38be | 2018-06-28 12:33:51 +0100 | [diff] [blame] | 98 | --generate-http-password:: |
| 99 | Generate a new random HTTP password for the user account |
| 100 | similar to the web ui. The password will be output to the |
| 101 | user on success with a line: `New password: <PASSWORD>`. |
| 102 | |
Peter Jönsson | e402ea7 | 2012-09-04 22:09:29 +0200 | [diff] [blame] | 103 | --http-password:: |
| 104 | Set the HTTP password for the user account. |
| 105 | |
David Ostrovsky | db8dfae | 2014-07-23 02:38:32 +0200 | [diff] [blame] | 106 | --clear-http-password:: |
| 107 | Clear the HTTP password for the user account. |
| 108 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 109 | == EXAMPLES |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 110 | Add an email and SSH key to `watcher`'s account: |
| 111 | |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 112 | ---- |
David Shevitz | c47f236 | 2018-09-27 10:55:35 -0700 | [diff] [blame] | 113 | $ cat ~/.ssh/id_watcher.pub | ssh -p 29418 review.example.com gerrit set-account --add-ssh-key - --add-email mail@example.com watcher |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 114 | ---- |
Deniz Turkoglu | 2c4bbcf | 2012-04-13 15:26:01 +0200 | [diff] [blame] | 115 | |
| 116 | GERRIT |
| 117 | ------ |
| 118 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 119 | |
| 120 | SEARCHBOX |
| 121 | --------- |