Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

creating user does not create home directory

Why is it that when I create the following user, the following problems occur?

  1. The home directory is not created.
  2. The uid is not a system id (less than 500)

Using ubuntu 12.04

class gitlab::setup {
  user { 'git' : 
    name      => 'git',
    ensure    => present, 
    shell     => '/bin/bash',
    password  => '*',
    home      => '/home/git',
    system    => true,                      #Makes sure user has uid less than 500
  }
}

cat /vagrant/tests/setup.pp
include gitlab::setup

After a puppet apply, the git user is present, but has an id of 997 and no home directory

root@ubuntu-server-12042-x64-vbox4210-nocm:/home# id git
uid=997(git) gid=997(git) groups=997(git)
root@ubuntu-server-12042-x64-vbox4210-nocm:/home# ls /home/git
ls: cannot access /home/git: No such file or directory

creating user does not create home directory

Why is it that when I create the following user, the following problems occur?

  1. The home directory is not created.
  2. The uid is not a system id (less than 500)

Using ubuntu 12.04

class gitlab::setup {
  user { 'git' : 
    name      => 'git',
    ensure    => present, 
    shell     => '/bin/bash',
    password  => '*',
    home      => '/home/git',
    system    => true,                      #Makes sure user has uid less than 500
  }
}

cat /vagrant/tests/setup.pp
include gitlab::setup

After a puppet apply, the git user is present, but has an id of 997 and no home directory

root@ubuntu-server-12042-x64-vbox4210-nocm:/home# id git
uid=997(git) gid=997(git) groups=997(git)
root@ubuntu-server-12042-x64-vbox4210-nocm:/home# ls /home/git
ls: cannot access /home/git: No such file or directory

Update:

I have also used the managehome resource to try and create the home directory, however it has the same result, no home directory. http://www.puppetcookbook.com/posts/create-home-directory-for-managed-users.html

creating user does not create home directory

Why is it that when I create the following user, the following problems occur?

  1. The home directory is not created.
  2. The uid is not a system id (less than 500)

Using ubuntu 12.04

class gitlab::setup {
  user { 'git' : 
    name      => 'git',
    ensure    => present, 
    shell     => '/bin/bash',
    password  => '*',
    home      => '/home/git',
    system    => true,                      #Makes sure user has uid less than 500
  }
}

cat /vagrant/tests/setup.pp
include gitlab::setup

After a puppet apply, the git user is present, but has an id of 997 and no home directory

root@ubuntu-server-12042-x64-vbox4210-nocm:/home# id git
uid=997(git) gid=997(git) groups=997(git)
root@ubuntu-server-12042-x64-vbox4210-nocm:/home# ls /home/git
ls: cannot access /home/git: No such file or directory

Update:

I have also used the managehome resource to try and create the home directory, however it has the same result, no home directory. see http://www.puppetcookbook.com/posts/create-home-directory-for-managed-users.html

creating user does not create home directory

Why is it that when I create the following user, the following problems occur?

  1. The home directory is not created.
  2. The uid is not a system id (less than 500)

Using ubuntu 12.04

class gitlab::setup {
  user { 'git' : 
    name      => 'git',
    ensure    => present, 
    shell     => '/bin/bash',
    password  => '*',
    home      => '/home/git',
    system    => true,                      #Makes sure user has uid less than 500
    managehome => true,

  }
}

cat /vagrant/tests/setup.pp
include gitlab::setup

After a puppet apply, the git user is present, but has an id of 997 and no home directory

root@ubuntu-server-12042-x64-vbox4210-nocm:/home# id git
uid=997(git) gid=997(git) groups=997(git)
root@ubuntu-server-12042-x64-vbox4210-nocm:/home# ls /home/git
ls: cannot access /home/git: No such file or directory

Update:

I have also used the managehome resource to try and create the home directory, however it has the same result, no home directory. see http://www.puppetcookbook.com/posts/create-home-directory-for-managed-users.html