I am trying to switch to another user using su command, but it doesn't work as expected.
What I am expecting:
[root@ubuntu ~]# su testuser
[testuser@ubuntu root]#
What actually happens:
[root@ubuntu ~]# su testuser
bash-4.2$
whoami command:
bash-4.2$ whoami
testuser
The testuser might not have the same bash configuration. So the prompt might look different. Check the current user with
whoamiafter you switched the user.