背景:
因harbor镜像仓库长期没有进行维护工作,导致harbor镜像仓库的admin账号的密码忘记了,需要进行重置处理。
admin密码重置过程:
1、登入到db数据库中修改admin密码为初始密码:
登入到harbor-db容器中:
service@harbor:~/harbor$ docker exec -it harbor-db /bin/bash
root [ / ]#
登入到harbor-db的pg数据库服务中:
root [ / ]# psql -h postgresql -d postgres -U postgres
Password for user postgres:
psql (9.6.10)
Type "help" for help.
postgres=#
切换到registry数据库中:
postgres=# \c registry
You are now connected to database "registry" as user "postgres".
查看harbor-user表中admin用户的信息:
registry=# select * from harbor_user where username='admin';
user_id | username | email | password | realname | commen