views:

1505

answers:

5

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.

+2  A: 

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

VonC
+1  A: 

TeamCity always uses a database - if you haven't explicitly configured one, it uses a HSQLDB database to store data internally.

When using an external database, user information is stored within that database, so it seems pretty likely that the user information in your case will be stored within the HSQLDB system.

You might be able to gain access to the system by futzing around with the database - but I'd suggest taking a backup first.

Second suggestion - drop the support guys at JetBrains an email. Even before my workplace splashed out on a TeamCity Enterprise license, their support was superb - fast, accurate and helpful.

Bevan
+2  A: 

Try the following:

First stop the TeamCity service (would also stop the build agent if installed). Next open up a console, go to your java directory and run the following command from there:

java.exe -cp server.jar; hsqldb.jar ChangePassword USERNAME PASSWORD "PATH_TO_YOUR_TEAMCITY_INSTALLATION".BuildServer
Flo
+3  A: 

In case none of those works, see http://sebastienlachance.com/post/Resetting-TeamCity-Password.aspx.

Open a command prompt and go to \webapps\ROOT\WEB-INF\lib folder. Now type the following :

........\jre\bin\java.exe -cp server.jar; common-api.jar;commons-codec-1.3.jar;util.jar;hsqldb.jar ChangePassword username newpassword

Sebastien Lachance
+1  A: 

I've just had to go through this pain with v5 EAP.

I managed to reset the password successfully by running:

C:\TeamCity\webapps\ROOT\WEB-INF\lib>..\..\..\..\jre\bin\java -cp server.jar;common-api.jar;commons-codec-1.3.jar;util.jar;hsqldb.jar ChangePassword admin password c:\TeamCity\.BuildServer

Although you'll need to substitute C:\TeamCity with wherever your installation is located.

Brian Hinchey