简体   繁体   中英

How do I run the Azure Agent on Linux with Service Account credentials?

On my Linux-based Continuous-Build machine I have installed the Microsoft Azure Agent to have our Windows-based Azure Server deploying build jobs each night. But how can I run this Agent with the credentials of a Sercive Account, that does not allow SSH logon itself?

Currently, I set up the Agent with my own user account " user01 ", but later I want to run the Agent with a Service Account called " agent007 ". " user01 " and " agent007 " are both in the same group " project ", which has full access to the Azure Agent installation directories.

When I call all these scripts as " user01 ", everything works like a charm, except for the Agent is running as " user01 ".

./config.sh
./env.sh
sudo ./svc.sh install
sudo ./svc.sh start

Questions:

What is the intended way to configure, install and run Microsoft Azure Agent on Linux with Service Account credentials?

Which of these scripts need to be run as " user01 " or " agent007 " or as group " project "?

Is there anything special to consider when switching the user that runs such an Agent? Certificates or additional permissions? Anything?

Unfortunately, I don't think it's possible to achieve it. You can learn about the VM Agent on Linux here and you can see that the agent helps you provision the VM. And to do the provision, the agent needs to run as root. So It's meaningless to change the user, just run it as root.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM