Skip to content

how to delete users in local DB to change authentication mode? #16817

Answered by hellt
hellt asked this question in Q&A
Discussion options

You must be logged in to vote

unswering my own q

  1. make a backup of your database (cp -r /data/database /somebackuppath)
  2. run psql in a harbor_db container (docker exec -it <cid> bash and then psql)
  3. within psql shell connect to registry db - \c registry
  4. then drop all users with user_id >2 (1 is admin, 2 is anonymous) - delete from harbor_user where user_id > 2;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stonezdj
Comment options

Answer selected by hellt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants