[PR #5090] [CLOSED] Fix ui-post-install.sh remove use of loginuid (#5082) #24912

Open
opened 2026-08-05 06:09:17 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5090
Author: @ian-knight-acacia
Created: 1/12/2026
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • 8932d10 Fix ui-post-install.sh remove use of loginuid (#5082)

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 release_files/ui-post-install.sh (+3 -3)

📄 Description

Describe your changes

Edit: sorry for the spam; I took a second pass at this for a cleaner implementation.

Fixes #5082 by using non-truncated user field output from ps instead of getting uid and converting with id.

  • Using -o 'user:256=' instead of --no-headers -o '%U' prevents truncation up to at least 256 chars (the username length limit)
  • Keeps simplified/refactored code from 9bd578d, avoiding the use of sed by using word-splitting on a known-format value.
  • Tested script and ps invocations against multiple current and history distributions, including Alma, Fedora, Debian, Ubuntu
  • Validated against shellcheck

#5082

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

This fixes a post-install script used in Linux packages, which should be invisible to regular users.

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

N/A

Summary by CodeRabbit

  • Bug Fixes
    • Improved the post-installation process to more reliably retrieve user information during setup. All existing functionality is preserved.

✏️ Tip: You can customize this high-level summary in your review settings.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/5090 **Author:** [@ian-knight-acacia](https://github.com/ian-knight-acacia) **Created:** 1/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`8932d10`](https://github.com/netbirdio/netbird/commit/8932d1010ee706d5182863287462ec1224848bda) Fix ui-post-install.sh remove use of loginuid (#5082) ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `release_files/ui-post-install.sh` (+3 -3) </details> ### 📄 Description ## Describe your changes Edit: sorry for the spam; I took a second pass at this for a cleaner implementation. Fixes #5082 by using non-truncated user field output from ps instead of getting uid and converting with id. - Using `-o 'user:256='` instead of `--no-headers -o '%U'` prevents truncation up to at least 256 chars (the username length limit) - Keeps simplified/refactored code from 9bd578d, avoiding the use of `sed` by using word-splitting on a known-format value. - Tested script and ps invocations against multiple current and history distributions, including Alma, Fedora, Debian, Ubuntu - Validated against shellcheck ## Issue ticket number and link #5082 ## Stack <!-- branch-stack --> ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) This fixes a post-install script used in Linux packages, which should be invisible to regular users. ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: N/A <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved the post-installation process to more reliably retrieve user information during setup. All existing functionality is preserved. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 06:09:17 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#24912