Hubidubi
Hubidubi

Reputation: 880

Gerrit & modifying Non-Interactive Users

I made a local user in Gerrit with ssh (gerrit create-user). I would like to change the proper name of the user, but I can't find any way to do it.

Can I change user data or at least can I delete the user?

Upvotes: 2

Views: 8174

Answers (2)

pcambra
pcambra

Reputation: 721

Adding a comment in case someone struggles with changing the username when using LDAP for Gerrit.

When you inform accountFullName setting in gerrit.config, you can't change the username from the UI (Although seems that if you leave it empty you'll be able, I haven't succeeded in that)

What I've ended up doing is configure accountFullName to ${givenName} ${sn}.

From the docs (config.gerrit ones, https://gerrit-documentation.storage.googleapis.com/Documentation/2.8.5/config-gerrit.html):

"Default is displayName for RFC 2307 servers, and ${givenName} ${sn} for Active Directory."

Upvotes: 1

Vicente Quintans
Vicente Quintans

Reputation: 1416

Changing Full Name info

If you can login with that user

  1. Go to "Settings" in the top right corner
  2. Clic "Contact Information"
  3. Update the Full Name of the user

Modifying the user in the database

  1. Connect to the database: ssh -p 29418 review.example.com gerrit gsql
  2. Find the user to modify: select * from accounts ;
  3. Update user data: update accounts set full_name = 'Any User Name' where account_id = <X>

Deleting the user

At present there is no easy way to delete an account. You need to remove the references in the proper tables (there are not so many).

Upvotes: 9

Related Questions