Languages
[Edit]
EN

Linux - unable to login to jenkins user (CentOS 7)

1 points
Created by:
Marcin
16270

Problem

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

Solution

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$

 

Native Advertising
­čÜÇ
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - friendly IT community for everyone.

ÔŁĄ´ŞĆ­čĺ╗ ­čÖé

Join