Using "su - " to change user gives "No passwd entry for user"

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 (useradd/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:

adduser jenkins