Ask Your Question
0

User created account is owned by root

asked 2014-10-13 23:42:05 -0500

Aykyu gravatar image

I'm using puppet to create a user, the command I give is below.

The user is created fine, except the home directory is owned by root. This is a problem because when I try to log in from the login screen, it does not let me (I'm using Ubuntu). If I make my new user the directory owner, then everything works fine. Is there a way that I can avoid having to do this when creating a new user?

user{ "myuser":   
ensure      => "present",   
groups      =>  ["sudo","video","lpadmin"],   
password  => 'password',   
home        => "/home/myuser",   #this directory gets owned by root
comment     => 'user',   
shell       => '/bin/bash' }
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-10-14 02:43:51 -0500

Waldemar gravatar image

Are you sure the directory /home/myuser was created by puppet? You need to set managehome => true if you want puppet to create/manage your home. Otherwise it is not touched.

Puppet References User

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-10-13 23:42:05 -0500

Seen: 168 times

Last updated: Oct 14 '14