Skip to content

Comments

fix_installer: address missing user#21797

Open
thiagoftsm wants to merge 1 commit intonetdata:masterfrom
thiagoftsm:fix_installer
Open

fix_installer: address missing user#21797
thiagoftsm wants to merge 1 commit intonetdata:masterfrom
thiagoftsm:fix_installer

Conversation

@thiagoftsm
Copy link
Contributor

@thiagoftsm thiagoftsm commented Feb 21, 2026

Summary

When running netdata on Windows, it is possible to find issues like this:

Error
Job check failed: error on quering XML GPU info: RunUnprivileged: C:\Program Files\Netdata\usr\bin\nd-run.exe C:\windows\system32\nvidia-smi.exe -q -x: exit status 1 (stderr: Fallback user 'nobody' not found either)

This PR fixes this issue.

Test Plan
  1. Compile this branch on Windows.
  2. Generate package
  3. Verify you have on msys the file /opt/netdata/etc/passwd
  4. Generate installer
  5. Reinstall netdata.
  6. Verify after these steps error messages like above are not appearing.
Additional Information
For users: How does this change affect me?

Summary by cubic

Fixes Windows installer packaging to prevent “Fallback user 'nobody' not found” errors by creating /opt/netdata/etc/passwd with a 'nobody' entry. Also initializes the editor setting only when /opt/netdata/etc/profile is missing to avoid duplicates.

  • Bug Fixes
    • Create /opt/netdata/etc/passwd with: nobody:*:65534:65534::/var/empty:/bin/false (if missing).
    • Write EDITOR="/usr/bin/nano.exe" to /opt/netdata/etc/profile only when the file doesn’t exist.

Written for commit b3ee8f5. Summary will update on new commits.

@thiagoftsm thiagoftsm requested a review from a team as a code owner February 21, 2026 03:27
@github-actions github-actions bot added the area/packaging Packaging and operating systems support label Feb 21, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Confidence score: 4/5

  • This PR looks safe to merge overall; the only concern is a moderate issue around user setup in the Windows packaging script.
  • packaging/windows/package-windows.sh only checks for the passwd file, so a missing nobody entry can persist and keep the original failure mode in some environments.
  • Pay close attention to packaging/windows/package-windows.sh - ensure the nobody entry is added when absent even if the passwd file already exists.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packaging/windows/package-windows.sh">

<violation number="1" location="packaging/windows/package-windows.sh:54">
P2: Only checking for the passwd file’s existence can leave the `nobody` user missing when the file already exists. This keeps the original failure mode. Check for the `nobody` entry instead so it is added when absent.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

${GITHUB_ACTIONS+echo "::endgroup::"}

${GITHUB_ACTIONS+echo "::group::Nobody user"}
if [ ! -f "/opt/netdata/etc/passwd" ]; then
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Only checking for the passwd file’s existence can leave the nobody user missing when the file already exists. This keeps the original failure mode. Check for the nobody entry instead so it is added when absent.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packaging/windows/package-windows.sh, line 54:

<comment>Only checking for the passwd file’s existence can leave the `nobody` user missing when the file already exists. This keeps the original failure mode. Check for the `nobody` entry instead so it is added when absent.</comment>

<file context>
@@ -45,7 +45,13 @@ rm -rf /opt/netdata/msys64/
 ${GITHUB_ACTIONS+echo "::endgroup::"}
+
+${GITHUB_ACTIONS+echo "::group::Nobody user"}
+if [ ! -f "/opt/netdata/etc/passwd" ]; then
+    echo 'nobody:*:65534:65534::/var/empty:/bin/false' >> /opt/netdata/etc/passwd
+fi
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/packaging Packaging and operating systems support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant