TeamCity forgotten admin password - where to look?

后端 未结 19 1091
情书的邮戳
情书的邮戳 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:51

    Specifically for TeamCity running on Tomcat on Windows it will be C:\ProgramData\JetBrains\TeamCity

    The directory specified as the last parameter needs to be your Data Directory (find in /logs/teamcity-server.log)

    You'll get the 'Table not found' error if you don't have this correct.

    You'll get a 'The database is already in use' error if you've got TeamCity running.

    you can also search you /logs/teamcity-server.log to see whether you created admin, administrator, or some other admin user name.

    0 讨论(0)
  • 2020-12-23 11:51

    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]

    0 讨论(0)
  • 2020-12-23 11:52

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

    0 讨论(0)
  • 2020-12-23 11:52

    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
    
    0 讨论(0)
  • 2020-12-23 11:55

    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.

    0 讨论(0)
  • 2020-12-23 11:57

    First point is if you logout the login screen has the username 'TCAdmin' already filled in, when it should be 'administrator'. TCAdmin is the full name of (I think) the default version 5 admin user. Changing that to administrator and then using the password I thought it was solved my issue.

    For resetting... In case it helps someone else on Windows XP on version 5 of TeamCity, my .BuildServer config info was also under my current logged in user's documents and settings folder. Also I was tripped up by a space in the list of jar files in Sebastien's good answer above.

    So I changed to this directory in a command prompt:

     c:\teamcity\webapps\ROOT\WEB-INF\lib 
    

    and then this command line (to set password: Password1) worked for me:

    C:\TeamCity\webapps\ROOT\WEB-INF\lib>..\..\..\..\jre\bin\java.exe -cp server.jar;commonapi.jar;commons-codec-1.3.jar;util.jar;hsqldb.jar ChangePassword administrator Password1
    

    Which gave output:

    Using TeamCity configuration directory path: C:/Documents and Settings/tamw/.BuildServer 
    Password changed successfuly
    
    0 讨论(0)
提交回复
热议问题