![glassfish:此请求中给出的凭据 [用户:admin] 的授权被拒绝](https://linux22.com/image/862311/glassfish%EF%BC%9A%E6%AD%A4%E8%AF%B7%E6%B1%82%E4%B8%AD%E7%BB%99%E5%87%BA%E7%9A%84%E5%87%AD%E6%8D%AE%20%5B%E7%94%A8%E6%88%B7%EF%BC%9Aadmin%5D%20%E7%9A%84%E6%8E%88%E6%9D%83%E8%A2%AB%E6%8B%92%E7%BB%9D.png)
在 Ubuntu 14.04 Tahr 和 Glassfish 4.1 上,我设法重置了我的 glassfish 主密码,如下所示:
ejb@ix:~$
ejb@ix:~$ glassfish4/glassfish/bin/asadmin change-master-password
Enter the current master password>
Enter the new master password>
Enter the new master password again>
Command change-master-password executed successfully.
ejb@ix:~$
ejb@ix:~$ glassfish4/glassfish/bin/asadmin change-admin-password
Enter admin user name [default: admin]>admin
Enter the admin password>
Enter the new admin password>
Enter the new admin password again>
Authorization has been refused for credentials [user: admin] given in this request.
(Usually, this means invalid user name and/or password)
Command change-admin-password failed.
ejb@ix:~$
ejb@ix:~$ glassfish4/glassfish/bin/asadmin change-admin-password
Enter admin user name [default: admin]>admin
Enter the admin password>
Enter the new admin password>
Enter the new admin password again>
Authorization has been refused for credentials [user: admin] given in this request.
(Usually, this means invalid user name and/or password)
Command change-admin-password failed.
ejb@ix:~$
ejb@ix:~$
我如何重置管理员密码?我尝试使用“adminadmin”作为默认管理员密码——但这对我来说不起作用。(对于任何路过的人来说,默认主密码是“changeit”。)
注意:为了使用glassfish 4.x,我直接从网站下载并解压文件,因此这是不是来自 repo。
答案1
它在文档中,请参阅第 1 章第 1 页管理指南
注意:对于 GlassFish Server 4.0 的 zip 包,默认管理员登录名为 admin,没有密码,这意味着无需登录。