我在Windows 11,tomcat版本9.0.78上这样定义了tomcat-users.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="tomcat"/>
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="jack" password="4f60ef32b9f4cf8a30d85167c9575e627d1f03845575a620ff5654b85eb29add$1$15a54860775edfab43b7010aed9ca814c6647f5b1c07253cbcdac7dc80e07833ee9ae5392aac0b7ba96760100a1462dcc51ed91cb8c4768bba1de77193f0ad57" roles="tomcat,manager-gui,admin-gui"/>
<user username="TomcatJackAdmin" password="test" roles="manager-gui"/>
</tomcat-users>
字符串
我已经从bin目录中生成了这样的哈希:
bin>.\digest.bat -a SHA-512 -h org.apache.catalina.realm.MessageDigestCredentialHandler password
型
当我在Windows上使用TomcatJackAdmin
和test
登录到Tomcat管理器(tomcat 9.0.78)时,它工作正常。但是我试图使用加密的东西,用户名-jack
和上面存在哈希的password
。它不起作用。我是否需要额外的步骤来解决上述问题?
1条答案
按热度按时间bfrts1fy1#
Battle.bat-a sha-256 admin
使用tomcat-users.xml中的哈希值更改密码在server.xml中添加:
字符串
结果是:
型