Specifically, I am trying test something on my build server by switching to the "jenkins" user:
sudo su - jenkins No passwd entry for user 'jenkins'
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
The error message is pretty much self-explanatory. It says that the user
jenkins has no entry in the
/etc/passwd file i.e. the user does not exist in the system.
When you do any user related operations that requires username, password, home directory, shell information, the
/etc/passwd file is consulted first. No entry in that file leading to the very error you are getting. So you need to create the user first (
adduser). As a side note, unless necessary you should create any service specific user (non-human) e.g.
jenkins as system user.
After a quick search for "List all users in Linux", I found this answer and ran the following command:
cut -d: -f1 /etc/passwd
and, As @Ipor Sircer, suggested, this user does not actually exist, and I have to add it with: