Harbor正确密码登录不上去

Harbor正确密码登录不上去

[root@hub harbor]# docker ps
CONTAINER ID        IMAGE                                  COMMAND                  CREATED             STATUS                            PORTS                                         NAMES
cf5d0df2935f        goharbor/nginx-photon:v1.10.11         "nginx -g 'daemon of…"   10 days ago         Up 4 hours (healthy)              0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp   nginx
5f373c689525        goharbor/harbor-jobservice:v1.10.11    "/harbor/harbor_jobs…"   10 days ago         Up 5 seconds (health: starting)                                                 harbor-jobservice
242b4f35f322        goharbor/harbor-core:v1.10.11          "/harbor/harbor_core"    10 days ago         Restarting (2) 38 seconds ago                                                   harbor-core
6fc46205eccb        goharbor/harbor-registryctl:v1.10.11   "/home/harbor/start.…"   10 days ago         Up 4 hours (healthy)                                                            registryctl
8ca6e340e8b5        goharbor/harbor-db:v1.10.11            "/docker-entrypoint.…"   10 days ago         Up 4 hours (healthy)              5432/tcp                                      harbor-db
42f03bcc4fb8        goharbor/harbor-portal:v1.10.11        "nginx -g 'daemon of…"   10 days ago         Up 4 hours (healthy)              8080/tcp                                      harbor-portal
0647d52988cf        goharbor/registry-photon:v1.10.11      "/home/harbor/entryp…"   10 days ago         Up 4 hours (healthy)              5000/tcp                                      registry
229aa32bbc70        goharbor/harbor-log:v1.10.11           "/bin/sh -c /usr/loc…"   10 days ago         Up 4 hours (healthy)              127.0.0.1:1514->10514/tcp                     harbor-log

找到harbor-db

[root@hub harbor]# docker exec -it 8ca6e340e8b5 /bin/bash
postgres [ / ]$ psql -h postgresql -d postgres -U postgres
Password for user postgres: 
psql (9.6.24)
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         | p
assword_version 
---------+-----------+-------+----------------------------------+----------------+----------------+---------+------------+----------------------------------+---------------+----------------------------+----------------------------+--
----------------
       2 | anonymous |       |                                  | anonymous user | anonymous user | t       |            |                                  | f             | 2022-05-26 10:47:32.927028 | 2022-05-26 10:47:33.890743 | s
ha1
       1 | admin     |       | 54c62fc210ea5a503b2993e6549d8551 | system admin   | admin user     | f       |            | pwebho64mmi20n5cqna8p4kimo9f9870 | t             | 2022-05-26 10:47:32.927028 | 2022-05-26 10:47:34.235676 | s
ha256
(2 rows)

registry=# update harbor_user set password='a71a7d0df981a61cbb53a97ed8d78f3e', salt='ah3fdh5b7yxepalg9z45bu8zb36sszmr', password_version='sha1' 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         | p
assword_version 
---------+-----------+-------+----------------------------------+----------------+----------------+---------+------------+----------------------------------+---------------+----------------------------+----------------------------+--
----------------
       2 | anonymous |       |                                  | anonymous user | anonymous user | t       |            |                                  | f             | 2022-05-26 10:47:32.927028 | 2022-05-26 10:47:33.890743 | s
ha1
       1 | admin     |       | a71a7d0df981a61cbb53a97ed8d78f3e | system admin   | admin user     | f       |            | ah3fdh5b7yxepalg9z45bu8zb36sszmr | t             | 2022-05-26 10:47:32.927028 | 2022-06-07 01:11:56.969128 | s
ha1
(2 rows)

registry=# 
registry=# \q
postgres [ / ]$ exit
exit
[root@hub harbor]# docker restart harbor-core
harbor-core

原因:assword_version加密版本错了,重置密码并将sha256改成sha1
再次输入账户admin,密码Harbor12345,登录成功
在这里插入图片描述

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值