TeamCity Username / password - passwords

Hi
I installed teamcity longtime ago, on my home computer.
I am trying to re-use it again now, but I forgot the admin username and password
Is there a default admin user name?
and how can I get the password?
Thank

From TeamCity 8 you can log in as a super user and change the password that way. You just need to use an empty username and last occurrence of the "super user authentication token" found in the logs\teamcity-server.log file as your password.
Please see the following for more information:
TeamCity 8 - http://confluence.jetbrains.com/display/TCD8/Super+User
TeamCity 9 - http://confluence.jetbrains.com/display/TCD9/Super+User

Ok, so you've forgot username and password in your teamcity instance.
How to reset password: described here.
How to get username:
go to the teamcity data directory
open config\database.properties file
there is connectionUrl property which points out to database which stores some teamcity settings
take a look at users table
Update
After you get the user name you can reset reset its password via the following(copied from linked answer):
Open a command prompt and go to \webapps\ROOT\WEB-INF\lib folder
Run the following: ..\..\..\..\jre\bin\java.exe -cp server.jar;common-api.jar;commons-codec-1.3.jar;util.jar;hsqldb.jar ChangePassword username newpassword

FYI, don't follow the advice of going through the users table. TeamCity is a quality product, so all passwords are salted/hashed (TC 9 below):
mysql [teamcity]> SELECT id, password FROM users;
+-----+---------------------------------------------------+
| id | password |
+-----+---------------------------------------------------+
| 21 | k9d9yuE13FtQm8eT:1e24ad492777f94dec0c905127d1ea48 |
| 13 | m1l79Yy03hjoxKdA:199d1ea48e28a78bafde576dd88e6de7 |
| 85 | gOBpYHipOrtEGbUx:88f234847c07085798f9a4f8726e39df |
+-----+---------------------------------------------------+

Related

Determine which project I'm in and which are available

I think I'm connected to BigQuery via ODBC:
isql -v BigQuery
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
My odbc.ini file looks similar to this:
[ODBC]
Trace=yes
TraceFile=/root/odbc.error
[BigQuery]
# 1 = User Authentication
Email=someemail#blah.iam.gserviceaccount.com
KeyFilePath=/service.json
Driver=/opt/simba/driver/lib/libgooglebigqueryodbc_sb64.so
OAuthMechanism=0
Catalog=someproject
With this ODBC connection, I assumed I would connect to project someproject. However, when I try to query a table I get:
SQL> select * from `someproject.ua.ua_user_daily` limit 10;
[37000][Simba][BigQuery] (100) Error interacting with REST API: Access Denied: Project someproject: User does not have bigquery.jobs.create permission in project someproject.
[ISQL]ERROR: Could not SQLPrepare
I wanted to know which projects are therefore available to me within the SQL terminal, but I could not find any command to do this.
How can I test my connection by looking at what projects I do have access to?
The Problem you are facing deals with roles, you need to grant the role bigquery.jobs.create to the service account.
You can also add the role bigquery.user or bigquery.jobUser these two roles contain inside the role bigquery.jobs.create. Check all BigQuery roles that you can grant.
Additionally, if you want to use the same Service Account around multiple GCP projects see this post to see how you need to set it up.
You can Run the following Command in Cloud SDK to see which projects does your service account have access to:
gcloud projects list --impersonate-service-account=<your-service-account-email-address>
This command requires Cloud Resource Manager API to be enabled and resourcemanager.projects.list permission in your Service Account.

SpecFlow features are not recognized in test explorer

I added NUnit, NUnit Test Adapter, SpecFlow and my test are not recognized in test explorer. If I run the test from the feature file, with right click, it says that the build was succesful, but nothing happens and it's terminated in 0,001 sec. I check the default processor architecture too, but its ok. How can I solve it any ideas?
Login.feature
Feature: Login
Test the login functionality of application
Will verify if the username and password combinations are working as expected
#Regressiontest
#Browser:Chrome
Scenario Outline: Verify if the login functionality is working (+ve case)
Given I have navigated to my application
And I typed the <username> and <password>
When I click login button
Then I should see the EA page
Examples:
| username | password |
| admin | admin |
| karthik | karthik |
NUnit and NUnit3 Test Adapter versions weren't the same, so that's why the tests weren't recognized in test explorer.

Retrieve saved (hidden) SSH password from PhpStorm 2017.1

I have forgotten SSH password from Remote Server, but it is saved in IDE (PhpStorm 2017.1) in hidden way:
Is there any way to view hidden password?
I finally could retrieve password from PhpStorm 2017.1:
Go to Settings/Preferences | Appearance & Behavior | System Settings | Passwords, enter new master password and save.
Open /.PhpStorm2017.1/config/c.kdbx (in "Keepass 2" or "Keeweb") with saved master password.
Here it is!
Thanks to #LazyOne

Unable to login to the jboss 7.1 admin console on windows

Unable to login to the jboss 7.1 and 7.1.1 admin console on windows Server 2008 HPC Edition. i try also to add a new user(add-user.bat) nothing. Even the default user: admin=admin doesn't work.
This problem happens on domain and standalone.
With add-user.bat:
Realm (ManagementRealm) : ManagementRealm
Username : q
Password : superpassword
Re-enter Password : superpassword
The problem was that the Realm (ManagementRealm) value must be the same: ManagementRealm
There is a better solution if you don't want to add a second user that you might forget the password for again.
Folow these steps:
open jboss-as-x.x.x.Final\standalone\configuration\mgmt-users.properties and delete the user (i.e delete the line which has the username you want to use, such as admin=2c7123264278731425d1f53aeb55da1e)
open jboss-as-x.x.x.Final\domain\configuration\mgmt-users.properties and delete the user (i.e delete the line which has the username you want to use, such as admin=2c7123264278731425d1f53aeb55da1e)
run jboss-as-x.x.x.Final\bin\add-user.bat and add user in the following way:
3.1 select user type a
3.2 Realm (ManagementRealm) : ManagementRealm
3.3 Username : admin
3.4 Password : password
3.5 Re-enter Password : password
If you get JBAS015243: The user ‘admin’ already exists in at least one properties file. error, then you didn't complete steps 1 and 2.

How to determine the session id on remote machine for usage with psexec -i using script/powershell/...?

I am in need of a script or powershell command that will be able to determine the session id of a specific logged in user on remote machine, to be later used as parameter to the psexec -i execution of remote gui process on that session of that user on the remote machine.
So far i managed to use
psexec \\remoteMachine -u user -p pswrd query session
to get list of sessions on the remote machine:
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console 0 Conn wdcon
rdp-tcp#919 user 1 Active rdpwd
rdp-tcp#916 user 3 Active rdpwd
so i guess i could somehow isolate the needed id and use it - but haven't managed to do that yet
Any ideas?
Maybe other - simpler ways?
Thanks for the help.
As long as you're using PSExec, I would just stick with it. You can get the ID field pretty easily given a username e.g.:
$username = 'joe'
$results = psexec \\remoteMachine -u adminuser -p password query session
$id = $results | Select-String "$username\s+(\w+)" |
Foreach {$_.Matches[0].Groups[1].Value}
psexec \\remoteMachine -u $username -i $id -d notepad.exe
Note that you want to use -d with PSExec otherwise it will wait until the launched program exits.
It's possible to do that without PowerShell.
There is qwinsta command line tool that ships with Windows that you can use.
Example:
c:\>qwinsta
SESSIONNAME USERNAME ID STATE TYPE DEVICE
services 0 Disc
console 1 Conn
>rdp-tcp#0 YourUser 2 Active rdpwd
rdp-tcp 65536 Listen
Usage:
c:\>qwinsta /?
Display information about Remote Desktop Sessions.
QUERY SESSION [sessionname | username | sessionid]
[/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER] [/VM]
sessionname Identifies the session named sessionname.
username Identifies the session with user username.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server to be queried (default is current).
/MODE Display current line settings.
/FLOW Display current flow control settings.
/CONNECT Display current connect settings.
/COUNTER Display current Remote Desktop Services counters information.
/VM Display information about sessions within virtual machines.
With the PSTerinalServices powershell module you can get the user sessions and IDs.
The module can be found here: http://code.msdn.microsoft.com/PSTerminalServices
PS > Get-TSSession -UserName user1 -ComputerName pc1 | select UserName,SessionId
UserName SessionId
-------- ---------
User 1