What is the difference between running under system account and user account? - teamcity

I am new to TeamCity and currently installing it.
It was asking whether I want to be running the server under a "user account" or "the SYSTEM account" / running the agent under a "user account" or "the SYSTEM account".
I assumed that since my version control (clearcase) is configured to my employee id, I should select user account.
Is my assumption correct? When should either the SYSTEM account or a user account be used? What is the difference between them?

What you're talking about is allowing TeamCity to run as LocalSystem vs a specified user account (local or in ActiveDirectory). LocalSystem is highly privileged (see this article).
If you are interested in following the principle of least privelege, you should create a user account. If you're running TeamCity on your local workstation, LocalSystem is probably ok.
The same advice applies to the build agent.

The main difference for you as the user can be connection of the TeamCity to some remote repositories. I.e., you have an SSH authentication with keys configured in your user account, to access a git repository. From the user account you will be able to configure it almost out-of-box. But it will take time to configure authentication for system account.

Related

Unable to make Azure Agent Service run as my self

I'm trying to work around a problem with my Self-hosted Azure Pipeline agent. One of the workarounds listed here is to make the agent log on as myself, (instead of as the current, "Network Service" account it uses).
So I tried that. I went to the Services app, edited the "Azure Pipelines Agent" service and changed the user to be myself.
Windows then tells me that I'll need to stop the service and restart it. But when I do that, I get an error dialog with Error 1069: "The service did not start due to a logon failure"
I have tried to use both my Windows 10 Logon PIN (that I type to login when I sit down at the machine) as the password as well as my Azure AD password for our organization that lets me log on to all our resources. Neither one works.
I know I have the correct account. I don't have any other organization passwords that I know of. What am I doing wrong?
Change the logon user on DevOps agent services won't work.
If you'd like to run the agent with specific account, you need to uninstall the agent(config.cmd remove), then reconfigure the DevOps agent, type your account as below during the configuration.
You can validate the user account in DevOps pipeline with below task:
pool: self2
- script: whoami

Where to find domain credentials for Jenkins 2.289.3 Windows Installer?

On my new Windows 10, as I am trying to install Jenkins, I encountered following prompt:
Since I don't know what local or domain user creds to enter, I keep on getting following error:
Error logging on DESKTOP-xxxx\user: The user name or password is incorrect
From reading the official doc, I am understanding that this is something new that Jenkins installer is doing for running as a Windows service, but where do I find these credentials on Windows?
Most of the applications when installed on Windows OS may want to run as a service using either the local system account or a specific account which needs specific permissions on the OS. Please use any local admin account which already there on the system where you are trying to install Jenkins. If the system is joined to a domain, prefer to use an domain account which has admin privileges on the system.
The worst advice to grand admin permissions for a single service.
You need to use local existing credentials from your windows system (if it's not connected to a domain) or a domain creds. Don't use admin creds for the installation.

Add user to local group on remote computer using different credentials

I have credentials for the local "Administrator" user on every computer in my department. Sometimes, when I set the machines up for my colleagues, I forget to add my domain username in the administrators group (whoopsie!). It would be easy just setting up a remote desktop connection passing the Administrator user credential, but I'd like to do this "silently", so my question is: is there a way to pass those credentials by shell and then perform the usual operations for adding a user (mine, in this case) to the administrators group?
I work with Windows machines in an Active Directory environment.
Thanks.
Well, this is not from the shell, but you could from your PC/Server as admin run computer management, right click "Computer Management (local)" select "connect to another computer" and bring up the remote computers computer management console and add yourself to that computers local admin group in the background.
Hope that helps.

Installing services as different users

I was installing the filebeat application and I noticed that I needed to run powershell as administrator in order to install them. When I checked the service using wmic service get name,startname,status it showed Local System. I'm wondering what this account is as this is neither the user account or the administrator account. Will this always be the case when I install services as administrator? What is the difference if I install it as a normal user and as administrator?
In any case, I've set this service to start automatically when windows start. Would this service start only when the user I used to install it logs in or will it start regardless of which user logs in?
OK, let's unpack that one by one, in no particular order:
Only a user with administrator rights can install a service.
Services that are configured to start automatically are started as soon as Windows is up and running; Windows does not wait until somebody logs in. It makes no difference to the service who the logged-on user is, or whether anybody is logged in at all, unless the service application itself has been explicitly programmed to check.
The program that installs the service decides what account the service uses to run. Windows doesn't care what user account was used to install the service, it doesn't even keep track.
If the program that installs the service wants it to use an ordinary user account, it must know the password for that account. There are various special accounts that a service can run in, these accounts do not require a password. One of these special accounts is Local System.
Local System is the highest-privilege service account in Windows; it has all the same rights as an administrator, and can do things an administrator can't. Local System is also the account that the user-mode part of Windows itself runs in, roughly equivalent to the UNIX root account except that it doesn't have a password.
Additional notes, for completeness:
One alternative to Local System is for the service to run as Local Service or as Network Service, which are non-administrative service accounts. The only difference between the two is that if the computer is joined to an Active Directory domain, the Network Service account has network access to other machines in the domain and the Local Service account does not.
It is also possible to configure a service to run in a special service account that is unique to that particular service. This is mostly useful if you want the service to have access to a particular file or folder, but do not want to give it administrator rights.
Nitpickers corner:
It is I believe technically possible to reconfigure Windows to allow non-administrators to install services, but this is not supported and would be a Very Bad Idea. If you did, though, it would still make no difference who installed the service. Windows doesn't record this information.

Default username and password for TFS2010 installed as localhost

Merry Christmas everyone !
I've installed Team Foundation Server 2010 with advanced configuration but I left the settings as default (like Service Account: NT AUTHORITY\LOCAL SERVICE and others)...
All good until when I typed http://localhost:8080/tfs and there it asks me to provide username and password.
What is the default username and password ? I didn't provide any username and/or password during configuration.
I typed as my Windows account name but it doesn't work.
Help me please...
Thank you
EDIT: Please watch my short video capture: http://youtu.be/i8C5mp7fUsA
TFS uses Window's accounts for its permissions. If you're logging in on a workstation setup, rather than one linked to AD then remember you need to specify your machine name as part of the username, for example MACHINE\michaels.
In order to setup new projects you will need to first start off using an administrator account - if your normal username isn't a Windows administrator, then login using your admin username and password (you can then grant permissions to your normal account. You can also use the Windows security groups on the machine to add yourself - there will be a local group called "Team Foundation Administrators". MSDN has a list of the Windows groups you can configure.
it is the windows login , password and u can set it in the administration panel also .
UPDATE - mine was ashutosh-pc\ashutosh and my windows password
You have set your service account to LOCAL SERVICE. Please change this to NETWORK SERVICE. The login box you are getting is not to login TFS, but to get access to your machine resources. The LOCAL SERVICE account does not have enough permissions to operate TFS.
If you don't have NETWORK SERVICE, then use a regular windows account.
See for more information the TFS 2010 Install Guide.
Yeah definitely it works using your windows account, but in my case I have my hotmail email account linked to my windows.. so, I just used my email address and the password for this, I am sharing an screenshot, this is the firs default page after logged in.

Resources