1

For some reason, my Jenkins has begun to act up. I'm a newb to Jenkins, and am trying to learn it. I have no clue how to go about fixing this, but I do understand that you need to see the permissions to know what's up.

Firstly, this is worrying:

Running sudo pwck, I get:

sudo pwck
user 'lp': directory '/var/spool/lpd' does not exist
user 'news': directory '/var/spool/news' does not exist
user 'uucp': directory '/var/spool/uucp' does not exist
user 'list': directory '/var/list' does not exist
user 'irc': directory '/var/run/ircd' does not exist
user 'gnats': directory '/var/lib/gnats' does not exist
user 'nobody': directory '/nonexistent' does not exist
user 'syslog': directory '/home/syslog' does not exist
user 'whoopsie': directory '/nonexistent' does not exist
user 'mysql': directory '/nonexistent' does not exist
user 'jenkins': directory '/home/jenkins' does not exist
pwck: no changes

What's up with all of those directories missing?

You see at the end..."directory '/home/jenkins' does not exist". Well it's not supposed to, so what's up?

When I run: service jenkins start, I get what it said in the title:

No directory, logging in with HOME=/.

What does this mean, and how can I fix it?

Thanks

1 Answer 1

2

This is normal, may be not for jenkins user but for the rest. On linux you have users that run services, and some of these users never login, and should never have a shell on the linux machine, simply because they only serve to run services and stuff.

If you take a look in the /etc/passwd file these users should have the last value as /sbin/nologin

Exemple:

nobody:x:99:99:Nobody:/:/sbin/nologin

For your jenkins user, does he have a shell ? To check that run this command :

sudo getent passwd jenkins

You can also create the jenkins home directory:

sudo mkdir /home/jenkins
sudo chown jenkins:jenkins /home/jenkins

Your error tells you that when jenkis user log's in, the system gives him as a home directory the /, which is the root directory on linux. So creating his home directory, the error should disappear.

2
  • Hi, thanks. I'll test these things when I'm at my computer. It's my knowledge though that the Jenkins home directory is /var/lib/jenkins - How can I set it back to that? Again, I'll test if it has a shell when I get home, but I don't think it should have one as jenkins is a daemon. Commented Jan 16, 2014 at 19:59
  • to change the home directory of a user you can do : usermod -d /var/lib/jenkins jenkins
    – Boogy
    Commented Jan 17, 2014 at 7:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .