TeamCity forgotten admin password - where to look?

后端 未结 19 1094
情书的邮戳
情书的邮戳 2020-12-23 11:19

I need to recover/reset the admin password for JetBrain\'s TeamCity.

I have full RDP access to the server so no problems there. It\'s just been 2 mo

19条回答
  •  礼貌的吻别
    2020-12-23 11:32

    Here's what worked for me.

    Shut down server services

    > cd c:\TeamCity\webapps\ROOT\WEB-INF\lib>
    

    then

    > ..\..\..\..\jre\bin\java.exe -cp server.jar ;common-api.jar;commons-codec-1.3.jar;util.jar;hsqldb.jar ChangePassword admin password1 C:\ProgramData\JetBrains\TeamCity\
    

    Without the path at the end, it would fail with:

    Exception in thread "main" java.sql.SQLException: Table not found in statement [
    UPDATE users SET PASSWORD = ? WHERE USERNAME = ? AND REALM IS NULL]
            at org.hsqldb.jdbc.Util.throwError(Util.java:58)
            at org.hsqldb.jdbc.jdbcPreparedStatement.(jdbcPreparedStatement.ja
    va:1833)
            at org.hsqldb.jdbc.jdbcConnection.prepareStatement(jdbcConnection.java:5
    80)
            at ChangePassword.main(ChangePassword.java:14)
    

提交回复
热议问题