Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Non-system headscale user and group from DEB packages #2278

Open
2 of 4 tasks
maxlysenko opened this issue Dec 11, 2024 · 0 comments · May be fixed by #2322
Open
2 of 4 tasks

[Bug] Non-system headscale user and group from DEB packages #2278

maxlysenko opened this issue Dec 11, 2024 · 0 comments · May be fixed by #2322
Labels
bug Something isn't working
Milestone

Comments

@maxlysenko
Copy link

maxlysenko commented Dec 11, 2024

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

DEB packages from v0.23.0 release create non-system user and group with /home/headscale home dir and /bin/sh shell.

Expected Behavior

Creating system user and system group with /var/lib/headscale home dir and /usr/sbin/nologin shell.
Similar to the way described in thedocumentation for installation from official standalone binaries

sudo useradd \
 --create-home \
 --home-dir /var/lib/headscale/ \
 --system \
 --user-group \
 --shell /usr/sbin/nologin \
 headscale

Steps To Reproduce

Install v0.23.0 using DEB package from the GitHub releases page on a system where no headscale user and group exists.

Environment

- OS: Ubuntu 22.04
- Headscale version: 0.23.0
- Tailscale version:

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Anything else?

I see that postinstall.sh was updated in #2134 after release of v0.23.0 with fixes for home dir and shell, but maybe it still makes sense to create system user and system group?
E.g. by adding -r option for useradd and groupadd and adding -S option for Alpine's addgroup, like

useradd -r -s "$HEADSCALE_SHELL" -d "$HEADSCALE_HOME_DIR" -c "headscale default user" "$HEADSCALE_USER"
groupadd -r "$HEADSCALE_GROUP"
addgroup -S "$HEADSCALE_GROUP"
@maxlysenko maxlysenko added the bug Something isn't working label Dec 11, 2024
jyundt added a commit to jyundt/headscale that referenced this issue Dec 30, 2024
When creating the headscale user and group, create both as system groups
rather than creating them as 'user' groups.

FIXES juanfont#2278
@jyundt jyundt linked a pull request Dec 30, 2024 that will close this issue
6 tasks
@kradalby kradalby added this to the Next milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants