diff options
author | Andy Lutomirski <luto@kernel.org> | 2020-11-11 09:53:51 -0800 |
---|---|---|
committer | Andy Lutomirski <luto@kernel.org> | 2020-11-11 09:53:51 -0800 |
commit | 1ab5dea159016cd7a079811091d12d2d57a2c023 (patch) | |
tree | 576aa6400b9cf73149f3070161514d8a336ea3c7 | |
parent | ce55e319dd97aaff5d312feabfd93932d04f5724 (diff) | |
parent | 8af8c393ced5b6cd93f8627a8d57724b9cb1c3ad (diff) | |
download | virtme-1ab5dea159016cd7a079811091d12d2d57a2c023.tar.gz |
Merge branch 'arighi/master' into master
-rwxr-xr-x | virtme/guest/virtme-init | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/virtme/guest/virtme-init b/virtme/guest/virtme-init index 56226d3..a3ef852 100755 --- a/virtme/guest/virtme-init +++ b/virtme/guest/virtme-init @@ -46,6 +46,13 @@ touch /tmp/fstab mount --bind /tmp/fstab /etc/fstab rm /tmp/fstab +# Populate dummy entries in /etc/shadow to allow switching to any user defined +# in the system +(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 udevd=/usr/lib/systemd/systemd-udevd |