# User ID for build agent - how to specify that?

**URL:** <https://forum.buildkite.community/t/user-id-for-build-agent-how-to-specify-that/691>\
**Category:** General\
**Created:** [September 10, 2019, 6:57am UTC](https://forum.buildkite.community/t/user-id-for-build-agent-how-to-specify-that/691 "2019-09-10T06:57:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul\_h](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@paul\_h](https://forum.buildkite.community/u/paul_h)\
**Post date:** [September 10, 2019, 6:57am UTC](https://forum.buildkite.community/t/user-id-for-build-agent-how-to-specify-that/691/1 "2019-09-10T06:57:04Z")

</div>

I’ve three build-agent machines. Two MacMinis and a Linux box. On the two MacMini’s the buildkite agent is running as the human that set it up. On the Linux box it’s running as user buildkite-agent. I’d like to change that to the human (me; ‘paul’) who setup the box. How do I do that?

---

<div class="post-metadata">

**Author:** ![Sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Sam](https://forum.buildkite.community/u/Sam)\
**Post date:** [September 18, 2019, 12:16am UTC](https://forum.buildkite.community/t/user-id-for-build-agent-how-to-specify-that/691/2 "2019-09-18T00:16:23Z")

</div>

What version of Linux? Is it running systemd? You will most likely need to create a custom systemd service file (if you haven’t already) and set the user there.

For debian based systems it would be `cp /lib/systemd/system/buildkite-agent.service /etc/systemd/system/buildkite-agent.service` and then update the `User=buildkite-agent` line in `/etc/systemd/system/buildkite-agent.service`. For redhat based I think it’s `/usr/lib/systemd/system/buildkite-agent.service` you need to copy.

---

<div class="post-metadata">

**Author:** ![paul\_h](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@paul\_h](https://forum.buildkite.community/u/paul_h)\
**Post date:** [September 19, 2019, 2:23pm UTC](https://forum.buildkite.community/t/user-id-for-build-agent-how-to-specify-that/691/3 "2019-09-19T14:23:22Z")

</div>

Kernel 5.2.0-15-generic : UBuntu 19.10, 64bit.

`/etc/systemd/system/buildkite-agent.service` already has line `User=buildkite-agent` - what are you saying I should update it to? Doh, to to the human account I’m talking about in the OP.

---

<div class="post-metadata">

**Author:** ![Sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Sam](https://forum.buildkite.community/u/Sam)\
**Post date:** [September 19, 2019, 9:32pm UTC](https://forum.buildkite.community/t/user-id-for-build-agent-how-to-specify-that/691/4 "2019-09-19T21:32:16Z")

</div>

Yep 😀 did you get it to work?
