标签:admin delete 文件 min 往里面 nec try type systemd
假如你修改了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
标签:admin delete 文件 min 往里面 nec try type systemd
原文地址:https://www.cnblogs.com/dalianpai/p/11795826.html