juanfont / headscale

An open source, self-hosted implementation of the Tailscale control server
BSD 3-Clause "New" or "Revised" License
23.24k stars 1.28k forks source link

[Bug] Debian packages use incorrect shell #2133

Closed jyundt closed 1 month ago

jyundt commented 1 month ago

Is this a support request?

Is there an existing issue for this?

Current Behavior

Currently, the .deb packages create the headscale user with /bin/sh:

https://github.com/juanfont/headscale/blob/fe68f503289db6cb1c2a568b8ae02a45ac632dd6/docs/packaging/postinstall.sh#L32

However, the docs list using /usr/sbin/nologin: https://github.com/juanfont/headscale/blob/fe68f503289db6cb1c2a568b8ae02a45ac632dd6/docs/running-headscale-linux-manual.md?plain=1#L44

Expected Behavior

Create the headscale user with a default shell of /usr/sbin/nologin. I believe this also generally aligns with standard best practices as well.

Steps To Reproduce

  1. Install headscale .deb
  2. verify headscale shell

Environment

- OS:Ubuntu 22.04.4
- Headscale version: 0.23.0-rc.1
- Tailscale version: N/A

Runtime environment

Anything else?

No response

jyundt commented 1 month ago

Quick update: I noticed that the headscale homedir wasn't set correctly either. I included that in my PR: https://github.com/juanfont/headscale/pull/2134