For accounts, in containers, that have no shell (e.g. user www-data) I'd like to use sudo, without ending up in /root/ folder.
Why does this only work after using it for the second time ? How can I avoid ending up in /root/ dir with sudo ?
$ sudo lxc-attach -n hugo
root@hugo:~# sudo -H -u golanger /bin/bash && cd /home/golanger
golanger@hugo:/root$
golanger@hugo:/root$ exit
root@hugo:/home/golanger# sudo -H -u golanger /bin/bash && cd /home/golanger
golanger@hugo:~$