[GH-ISSUE #1840] Admin UI 不断提示输入用户名和密码,输入正确也无法进入 #1450

Closed
opened 2026-05-05 12:55:09 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @williamoj on GitHub (Jun 4, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1840

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
frpc: 0.33.0
frps: 0.33.0

What operating system and processor architecture are you using (go env)?
frpc: Ubuntu 18.04.4
frpc client: macOS 10.14.6, Firefox 77.0.1
frps: CentOS 7.7

Configures you used:
admin_addr = 0.0.0.0
admin_port = 7277
admin_user = admin
admin_passwd = admin

Steps to reproduce the issue:

  1. 浏览器输入内网frpc客户端地址(http://192.168.1.6:7277)
  2. 浏览器弹窗提示需要输入用户名和密码
  3. 填入正确的用户名和密码
  4. 循环至步骤2,永远都是提示输入用户名和密码

Describe the results you received:
用户名和密码肯定是对的,换Chrome也是一样的结果

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):
frps和frpc都使用systemd运行

Can you point out what caused this issue (optional)

Originally created by @williamoj on GitHub (Jun 4, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/1840 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** frpc: 0.33.0 frps: 0.33.0 **What operating system and processor architecture are you using (`go env`)?** frpc: Ubuntu 18.04.4 frpc client: macOS 10.14.6, Firefox 77.0.1 frps: CentOS 7.7 **Configures you used:** admin_addr = 0.0.0.0 admin_port = 7277 admin_user = admin admin_passwd = admin **Steps to reproduce the issue:** 1. 浏览器输入内网frpc客户端地址(http://192.168.1.6:7277) 2. 浏览器弹窗提示需要输入用户名和密码 3. 填入正确的用户名和密码 4. 循环至步骤2,永远都是提示输入用户名和密码 **Describe the results you received:** 用户名和密码肯定是对的,换Chrome也是一样的结果 **Describe the results you expected:** **Additional information you deem important (e.g. issue happens only occasionally):** frps和frpc都使用systemd运行 **Can you point out what caused this issue (optional)**
Author
Owner

@Erik-37 commented on GitHub (Jun 4, 2020):

为什么登入7400端口?参数中写的是admin_port = 7277
如果不能解决你的问题,你可以试着换个端口或者清除下cookie

<!-- gh-comment-id:638681494 --> @Erik-37 commented on GitHub (Jun 4, 2020): 为什么登入7400端口?参数中写的是admin_port = 7277 如果不能解决你的问题,你可以试着换个端口或者清除下cookie
Author
Owner

@williamoj commented on GitHub (Jun 4, 2020):

为什么登入7400端口?参数中写的是admin_port = 7277
如果不能解决你的问题,你可以试着换个端口或者清除下cookie

7400是手误,是访问7277。端口是换过的,换过7400,cookie也是清过的。其实都提示输入用户名密码了,就是通了,只是过不了认证而已。

<!-- gh-comment-id:638684139 --> @williamoj commented on GitHub (Jun 4, 2020): > 为什么登入7400端口?参数中写的是admin_port = 7277 > 如果不能解决你的问题,你可以试着换个端口或者清除下cookie 7400是手误,是访问7277。端口是换过的,换过7400,cookie也是清过的。其实都提示输入用户名密码了,就是通了,只是过不了认证而已。
Author
Owner

@Erik-37 commented on GitHub (Jun 4, 2020):

试试直接向http://192.168.1.6:7277:7277/static/#/ 发送get请求,如果你的账户密码都是admin的话,记得在headers里面加一项{"Authorization" : "Basic YWRtaW46YWRtaW4="},看看这样是否能拿到返回的数据。
如果是自己编译的话,考虑下是不是web文件夹文件缺失。
我刚发现我的回答中少加了一个“#” sorry!! @williamoj

<!-- gh-comment-id:638690832 --> @Erik-37 commented on GitHub (Jun 4, 2020): 试试直接向http://192.168.1.6:7277:7277/static/#/ 发送get请求,如果你的账户密码都是admin的话,记得在headers里面加一项{"Authorization" : "Basic YWRtaW46YWRtaW4="},看看这样是否能拿到返回的数据。 如果是自己编译的话,考虑下是不是web文件夹文件缺失。 我刚发现我的回答中少加了一个“#” sorry!! @williamoj
Author
Owner

@williamoj commented on GitHub (Jun 4, 2020):

试试直接向http://192.168.1.6:7277:7277/static/#/ 发送get请求,如果你的账户密码都是admin的话,记得在headers里面加一项{"Authorization" : "Basic YWRtaW46YWRtaW4="},看看这样是否能拿到返回的数据。
如果是自己编译的话,考虑下是不是web文件夹文件缺失。
我刚发现我的回答中少加了一个“#” sorry!! @williamoj

不行,依然返回 401 Unauthorized

<!-- gh-comment-id:638705640 --> @williamoj commented on GitHub (Jun 4, 2020): > 试试直接向http://192.168.1.6:7277:7277/static/#/ 发送get请求,如果你的账户密码都是admin的话,记得在headers里面加一项{"Authorization" : "Basic YWRtaW46YWRtaW4="},看看这样是否能拿到返回的数据。 > 如果是自己编译的话,考虑下是不是web文件夹文件缺失。 > 我刚发现我的回答中少加了一个“#” sorry!! @williamoj 不行,依然返回 401 Unauthorized
Author
Owner

@Erik-37 commented on GitHub (Jun 4, 2020):

返回401有两种情况
第一种你的账号密码不全是admin
第二种你的header出了点问题
建议使用postman
image

<!-- gh-comment-id:638707659 --> @Erik-37 commented on GitHub (Jun 4, 2020): 返回401有两种情况 第一种你的账号密码不全是admin 第二种你的header出了点问题 建议使用postman ![image](https://user-images.githubusercontent.com/49860865/83735256-b58b8380-a682-11ea-892d-9d2b7ae7a559.png)
Author
Owner

@williamoj commented on GitHub (Jun 4, 2020):

返回401有两种情况
第一种你的账号密码不全是admin
第二种你的header出了点问题
建议使用postman
image

图片 我用的是Postwoman 配置文件你也是看到了,都是默认配置没改过的
<!-- gh-comment-id:638712100 --> @williamoj commented on GitHub (Jun 4, 2020): > 返回401有两种情况 > 第一种你的账号密码不全是admin > 第二种你的header出了点问题 > 建议使用postman > ![image](https://user-images.githubusercontent.com/49860865/83735256-b58b8380-a682-11ea-892d-9d2b7ae7a559.png) <img width="806" alt="图片" src="https://user-images.githubusercontent.com/14960328/83735706-4cf0d680-a683-11ea-8f55-725dce0bd93b.png"> 我用的是Postwoman 配置文件你也是看到了,都是默认配置没改过的
Author
Owner

@Erik-37 commented on GitHub (Jun 4, 2020):

正常登入查看返回是否是401,如果是401就是你的密码问题,尝试重新写一下ini文件,如果是200但无法登入,应该是你浏览器的问题

<!-- gh-comment-id:638716506 --> @Erik-37 commented on GitHub (Jun 4, 2020): 正常登入查看返回是否是401,如果是401就是你的密码问题,尝试重新写一下ini文件,如果是200但无法登入,应该是你浏览器的问题
Author
Owner

@williamoj commented on GitHub (Jun 4, 2020):

正常登入查看返回是否是401,如果是401就是你的密码问题,尝试重新写一下ini文件,如果是200但无法登入,应该是你浏览器的问题

非常感谢 @Erik-37 的详细解答和帮助。
看了源码,找到问题了,原来是配置文件写错了。
我用的是旧版本的配置文件。
旧版的密码项是“admin_passwd = admin”
新版的密码项是“admin_pwd = admin”

<!-- gh-comment-id:638735095 --> @williamoj commented on GitHub (Jun 4, 2020): > 正常登入查看返回是否是401,如果是401就是你的密码问题,尝试重新写一下ini文件,如果是200但无法登入,应该是你浏览器的问题 非常感谢 @Erik-37 的详细解答和帮助。 看了源码,找到问题了,原来是配置文件写错了。 我用的是旧版本的配置文件。 旧版的密码项是“admin_passwd = admin” 新版的密码项是“admin_pwd = admin”
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1450
No description provided.