Languages
[Edit]
EN

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

1 points
Created by:
Teilsa
1105

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$

 

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Linux

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join