重置方法:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
$ docker exec -it harbor-db /bin/bash postgres [ / ]$ psql -h postgresql -d postgres -U postgres #默认root123 postgres=# \c registry registry=# select * from harbor_user; user_id | username | email | password | realname | comment | deleted | reset_uuid | salt | sysadmin_flag | creation_time | update_time | password_version ---------+-----------+-------+----------+----------------+----------------+---------+------------+------+---------------+----------------------------+----------------------------+ ------------------ 2 | anonymous | | | anonymous user | anonymous user | t | | | f | 2024-05-04 06:06:36.489747 | 2024-05-04 06:06:36.718376 | sha1 1 | admin | | | system admin | admin user | f | | | t | 2024-05-04 06:06:36.489747 | 2024-06-25 13:06:16.294009 | sha256 (2 rows) registry=# update harbor_user set salt='', password='' where username='admin'; UPDATE 1 registry=# select * from harbor_user; user_id | username | email | password | realname | comment | deleted | reset_uuid | salt | sysadmin_flag | creation_time | update_time | password_version ---------+-----------+-------+----------+----------------+----------------+---------+------------+------+---------------+----------------------------+----------------------------+ ------------------ 2 | anonymous | | | anonymous user | anonymous user | t | | | f | 2024-05-04 06:06:36.489747 | 2024-05-04 06:06:36.718376 | sha1 1 | admin | | | system admin | admin user | f | | | t | 2024-05-04 06:06:36.489747 | 2024-06-25 13:06:16.294009 | sha256 (2 rows) registry=# \q postgres [ / ]$ exit exit $ /usr/local/bin/docker-compose -f /opt/harbor/docker-compose.yml down $ /usr/local/bin/docker-compose -f /opt/harbor/docker-compose.yml up -d |
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!