Skip to content

A Passionate Techie

keep learning, keep growing

Enter your email address to follow this blog and receive notifications of new posts by email.

Recent learnings

  • Network monitoring tools September 5, 2021
  • Network Latencies September 5, 2021
  • Linux Network Stack September 5, 2021
  • Congestion control algorithms September 5, 2021
  • TCP performance features September 5, 2021

Recent Comments

gamejudilebaran.wordpress.com's avatargamejudilebaran.word… on Chef: Roles and Environme…
Unknown's avatarWARN: Waiting for se… on OSSEC start problem due to…
Arati Kulkarni's avatararatik711 on Ansible issues
Arati Kulkarni's avatararatik711 on Chef: Roles and Environme…
situs judi's avatarsitus judi on Chef: Roles and Environme…

Archives

  • September 2021
  • August 2021
  • March 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • February 2019
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • May 2017
  • April 2017
  • March 2017
  • January 2017
  • July 2015

Categories

  • aws
  • azure
  • centos
  • cloud
  • gcp
  • java
  • javascript
  • jenkins
  • linux
  • python
  • Uncategorized

Meta

  • Create account
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com

Tag: switch

Change to jenkins user

Look at the shell specified in /etc/passwd for the jenkins user. You can do so by running something like:

grep jenkins /etc/passwd

The output will look similar to this:

jenking:1001:1001::/usr/local/jenkins:/bin/false

The last field is the login shell of the user. Here you can see it is set to /bin/false which will immediately exit.

The solution is to specify which shell to use as you described:

su -s /bin/bash jenkins

Or modify the login shell of the jenkins user with “usermod(8)” (executed as a root user) :

usermod -s /bin/bash jenkins

Then grep jenkins /etc/passwd should now output something like:

jenkins:1001:1001::/usr/local/jenkins:/bin/bash

After which. su - jenkins will work as you expect.

Rate this:

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
Like Loading...
Posted on August 22, 2017August 22, 2017Categories UncategorizedTags jenkins, linux, login, open, sheel, source, switch, tty, userLeave a comment on Change to jenkins user
Create a free website or blog at WordPress.com.
  • Subscribe Subscribed
    • A Passionate Techie
    • Join 108 other subscribers
    • Already have a WordPress.com account? Log in now.
  • Privacy
    • A Passionate Techie
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
%d
    Design a site like this with WordPress.com
    Get started