I can't login into jenkins linux user from root account.
When I try to login from root account to jenkins account with su -l jenkins I still see that I am login as root (whoami cmd).
My problem with command line:
[root@localhost ~]# su -l jenkins Last login: Wed Dec 02 08:21:10 EST 2020 on pts/0 [root@localhost ~]# whoami root
Jenkins user has default bash profile, so we need to login with bash shell specified.
[root@localhost jenkins]# sudo -u jenkins /bin/bash bash-4.2$ whoami jenkins bash-4.2$