Alex Rivera | Logout

TeamCity forgotten admin password - where to look?

Asked 2009-02-03T05:43:41.820
69

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 months since we used it so now I have forgotten my login - my usual ones don't work.

It is setup without a database at the moment, so was hoping the usernames would just be in a file somewhere, but no luck finding it so far.

Edit
Report

3 Answers

4

You could try to reset the installation of TeamCity, by removing TeamCity data directory ($/.BuildServer directory by default)

answered 2009-02-03T08:25:15.147
1

To change user password:

Shutdown server

Switch to the /webapps/ROOT/WEB-INF/lib directory

Invoke the following command:

Windows platform: java -cp server.jar;common-api.jar;commons-codec-1.3.jar;util.jar;hsqldb.jar ChangePassword

Unix platform: java -cp server.jar:common-api.jar:commons-codec-1.3.jar:util.jar:hsqldb.jar ChangePassword

You can skip the option, if you are using default path for TeamCity data files: /.BuildServer

[Ref: http://confluence.jetbrains.com/display/TCD7/Changing+user+password+with+default+authentication+scheme]

answered 2013-04-15T07:33:12.987
1

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.<init>(jdbcPreparedStatement.ja
va:1833)
        at org.hsqldb.jdbc.jdbcConnection.prepareStatement(jdbcConnection.java:5
80)
        at ChangePassword.main(ChangePassword.java:14)
answered 2013-04-17T10:03:22.627

Your Answer