diff options
author | Andy Lutomirski <luto@kernel.org> | 2020-11-11 09:46:23 -0800 |
---|---|---|
committer | Andy Lutomirski <luto@kernel.org> | 2020-11-11 09:46:23 -0800 |
commit | 8af8c393ced5b6cd93f8627a8d57724b9cb1c3ad (patch) | |
tree | 780f5f650b4fd63749857faecf66bbd941236a0b | |
parent | bd1d869920767216b39ac02f31acd4e78b535af0 (diff) | |
download | virtme-8af8c393ced5b6cd93f8627a8d57724b9cb1c3ad.tar.gz |
virtme-init: Clean up /etc/shadow generation
Signed-off-by: Andy Lutomirski <luto@kernel.org>
-rwxr-xr-x | virtme/guest/virtme-init | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/virtme/guest/virtme-init b/virtme/guest/virtme-init index 1c4653c..a3ef852 100755 --- a/virtme/guest/virtme-init +++ b/virtme/guest/virtme-init @@ -48,10 +48,10 @@ rm /tmp/fstab # Populate dummy entries in /etc/shadow to allow switching to any user defined # in the system -touch /tmp/shadow -chmod 0640 /tmp/shadow -sed -e 's/^\([^:]\+\).*/\1:x:::::::/' < /etc/passwd > /tmp/shadow +(umask 0644 && touch /tmp/shadow) +sed -e 's/^\([^:]\+\).*/\1:!:::::::/' < /etc/passwd > /tmp/shadow mount --bind /tmp/shadow /etc/shadow +rm /tmp/shadow # Find udevd if [[ -x /usr/lib/systemd/systemd-udevd ]]; then |