Skip to content

fix: set shadow file to root:shadow 0640 in mutable mode#41

Open
jfroche wants to merge 1 commit intonikstur:mainfrom
jfroche:shadow-permissions
Open

fix: set shadow file to root:shadow 0640 in mutable mode#41
jfroche wants to merge 1 commit intonikstur:mainfrom
jfroche:shadow-permissions

Conversation

@jfroche
Copy link

@jfroche jfroche commented Feb 6, 2026

When mutable users are enabled, tools like passwd need to read /etc/shadow, which requires the file to be accessible to the shadow group.

In mutable mode, set the shadow file to mode 0640 with the shadow group.

In immutable mode the existing 0000 behavior is preserved.

When mutable users are enabled, tools like passwd need to read
/etc/shadow, which requires the file to be accessible to the shadow
group.

In mutable mode, set the shadow file to mode 0640 with the shadow group.

In immutable mode the existing 0000 behavior is preserved.
jfroche added a commit to numtide/system-manager that referenced this pull request Feb 6, 2026
We have added a PR to userborn to fix the ownership/permission on
/etc/shadow: nikstur/userborn#41

/etc/shadow has mode 0640 and group shadow after both
activation and deactivation.
@nikstur
Copy link
Owner

nikstur commented Feb 17, 2026

Can you please check whether this is also true with the passwd from util-linux? In nixpkgs we weirdly use these tools from shadow and not from util-linux. If util-linux works, I'd prefer we switch upstream Nixpkgs to use util-linux instead of shadow.

Edit: please ignore.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants