Setup fails with "no account named <user>" for directory (non-/etc/passwd) users

Open
#349 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
linux, rust

Research direction

Start by tracing the first-run wizard's “Start engine” action and the “onboarding fix” path that reports the account lookup error. Check how that path resolves the current user and how the RPM build links the binary; the issue names no source files or tests. Done means setup starts for directory accounts that resolve through NSS, while the static RPM build remains supported.

Written by the indexing model from the issue text.

Description

bug
Kiri version and system

Kiri 0.2.1 (RPM), Fedora 45, KDE Plasma (Wayland), x86_64. User account from Microsoft Entra ID via Himmelblau (NSS module), not listed in /etc/passwd.

What you did
  1. Installed Kiri 0.2.1 from the RPM.
  2. Opened the first-run setup wizard.
  3. Clicked "Start engine".

My user account is a directory account (Entra ID via Himmelblau), resolved through NSS rather than /etc/passwd.

What happened
The wizard shows "no account named <user>" and the engine never starts.

`kiri diag logs --errors`:

WARN  ui  action failed action="onboarding fix" error="no account named <user>" target=running


The account resolves fine through the system's NSS:

$ getent passwd <user>
<user>:x:<uid>:<gid>:<full name>:/home/<user>:/bin/bash


But the binary is fully static:

$ file /usr/bin/kiri
ELF 64-bit LSB pie executable, x86-64, static-pie linked, ...


A static binary can't load NSS modules, so its user lookup only sees /etc/passwd. Accounts from SSSD/LDAP/AD, winbind, Himmelblau (Entra ID) or systemd-homed won't be found.
What you expected instead

The engine starts and setup continues for users that resolve via NSS (getent passwd works).

Anything else

Adding the user to /etc/passwd by hand isn't a viable workaround: without a matching /etc/shadow entry, PAM's account checks fail and sudo breaks for that user.

Suggested fix, either:

  • resolve users through NSS (e.g. dynamically link glibc for the lookup, or shell out to getent passwd), or
  • use the numeric UID (getuid() / $SUDO_UID / $PKEXEC_UID) rather than looking the user up by name.
Dominant language
Rust
Stars
7.5k
Forks
329
Avg merge
7h 48m
Merged PRs (30d)
105

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libracoder/kiri

All issues in libracoder/kiri

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.