Skip to content

Commit

Permalink
fix: mkUser script to keep /etc/{passwd,shadow,group,gshadow} from be…
Browse files Browse the repository at this point in the history
…ing overwritten
  • Loading branch information
gytis-ivaskevicius authored and blaggacao committed May 23, 2023
1 parent 909682b commit 959f54d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cells/lib/ops/mkUser.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ in
cell.ops.mkSetup "users" perms ''
mkdir -p $out/etc/pam.d
echo "${user}:x:${uid}:${gid}::${l.optionalString withHome "/home/${user}"}:${shell}" > $out/etc/passwd
echo "${user}:!x:::::::" > $out/etc/shadow
echo "${user}:x:${uid}:${gid}::${l.optionalString withHome "/home/${user}"}:${shell}" >> $out/etc/passwd
echo "${user}:!x:::::::" >> $out/etc/shadow
echo "${group}:x:${gid}:" > $out/etc/group
echo "${group}:x::" > $out/etc/gshadow
echo "${group}:x:${gid}:" >> $out/etc/group
echo "${group}:x::" >> $out/etc/gshadow
${withRootStr}
Expand Down

0 comments on commit 959f54d

Please sign in to comment.