Skip to content

fix: accept underscores and hyphens in usernames - #10334

Draft
tomatotomata wants to merge 1 commit into
armbian:mainfrom
tomatotomata:codex/username-underscore-961
Draft

fix: accept underscores and hyphens in usernames#10334
tomatotomata wants to merge 1 commit into
armbian:mainfrom
tomatotomata:codex/username-underscore-961

Conversation

@tomatotomata

Copy link
Copy Markdown

What changed

Fix the username handling used by armbian-firstlogin so names such as armbian_user and armbian-user are accepted consistently with the issue report in armbian/configng#961.

The validation pattern now permits _ and - after the initial letter, and the normalization step preserves those characters instead of silently removing them before useradd runs. Names must still start with a letter and remain limited to ASCII letters, digits, _, and -.

The related report is in the armbian/configng tracker, but the affected script is maintained in this repository under packages/bsp/common/usr/lib/armbian/armbian-firstlogin.

Validation

  • bash -n on the script after removing the repository file's existing CRLF line endings
  • Bash checks for armbian_user, armbian-user, and User_2
  • Rejection checks for _armbian and armbian.user
  • git diff --check

The separate Imager-side validation mentioned in the report is intentionally out of scope for this focused build-side fix.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4cb73260-0183-40d7-bbc4-23885e4375e2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size/small PR with less then 50 lines label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Hey @tomatotomata! 👋

Thanks for submitting your first pull request to the Armbian project — we're excited to have you contributing! 🧡
Your effort doesn’t just improve Armbian — it benefits the entire community of users and developers.

If you'd like to stay informed about project updates or collaborate more closely with the team,
you can optionally share some personal contact preferences at armbian.com/update-data.
This helps us keep in touch without relying solely on GitHub notifications.

Also, don’t forget to ⭐ star the repo if you haven’t already — and welcome aboard! 🚀

@github-actions github-actions Bot added 08 Milestone: Third quarter release Needs review Seeking for review BSP Board Support Packages labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 Milestone: Third quarter release BSP Board Support Packages Needs review Seeking for review size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

1 participant