Harbor密码重置 密码修改 admin密码重置
Posted dalianpai
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Harbor密码重置 密码修改 admin密码重置相关的知识,希望对你有一定的参考价值。
具体步骤:
假如你修改了admin的密码,然后忘记了,可以尝试以下的步骤,还有切记
不要修改
vim /usr/lib/systemd/system/docker.service 文件,当harbor在启动的时候,会往里面写数据
比如:
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock,改完以后直接报错账号密码不正确,应该导致了db的容器出问题了。
[root@topcheer harbor]# docker exec -it efe4d1fa922a /bin/bash root [ / ]# psql -h postgresql -d postgres -U postgres Password for user postgres: psql (9.6.10) Type "help" for help. postgres=# c registry You are now connected to database "registry" as user "postgres". registry=# select * from harbor_user; user_id | username | email | password | realname | comment | deleted | reset_uuid | salt | sysadmin_flag | creation_time | update_time ---------+-----------+-----------------------+----------------------------------+----------------+----------------+---------+------------+----------- -----------------------+---------------+----------------------------+---------------------------- 2 | anonymous | anonymous@example.com | | anonymous user | anonymous user | t | | | f | 2019-11-04 15:35:31.594562 | 2019-11-04 15:35:31.594562 1 | admin | admin@example.com | 2901ea0671f3921e90704552460e924e | system admin | admin user | f | | giapy26r6m ve652e4bgnmc4cvkavrch4 | t | 2019-11-04 15:35:31.594562 | 2019-11-04 15:35:31.741797 (2 rows) registry=#
例如修改admin的密码,修改为初始化密码Harbor12345 ,修改好了之后再可以从web ui上再改一次。
update harbor_user set password=‘a71a7d0df981a61cbb53a97ed8d78f3e‘, salt=‘ah3fdh5b7yxepalg9z45bu8zb36sszmr‘ where username=‘admin‘;
退出 q 退出postgresql,exit退出容器。
q
exit
以上是关于Harbor密码重置 密码修改 admin密码重置的主要内容,如果未能解决你的问题,请参考以下文章
linux12企业实战 -- 57 grafana重置登录密码