0

When i try to do the following inside a dash script:

#!/bin/dash

arch-chroot /mnt /bin/dash <<- EOF
    su myuser
    whoami
EOF

It simply logs the "root", but when i try to do it manually, it works fine:

$ arch-chroot /mnt
$ su myuser
$ whoami
> myuser 

Any clues of what might be happening? probably some undocumented pitfall of dash?

1 Answer 1

0

I managed to solve this with:

arch-chroot /mnt su myuser <<- EOF
    whoami
EOF

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .