/export/home and /home are odd on solarises.
what you could try is managehome => false and create the directory itself
with puppet.
file { "/home/$username":
ensure => directory,
....
}
On 6 September 2013 12:43, Andreas Dvorak <[email protected]>wrote:
> Dear all
>
> I have puppet 3.2 running and have a module to install user. On Linx user
> are created in /home but on Solaris it wants to create them in
> /export/home. I don't understand why.
>
> class admin_user::group {
> group { "baaderadm":
> gid => "888",
> ensure => present,
> }
> }
>
> class admin_user::add {
> define useradd ( $name, $uid, $group, $gid, $password, $shell,
> $sshkeytype, $sshkey) {
> $homedir = "/home"
> $username = $title
>
> user { $username:
> ensure => present,
> comment => "$name",
> uid => "$uid",
> gid => "$gid",
> shell => "$shell",
> home => "/home/$username",
> managehome => true,
> password => "$password",
> require => Group["baaderadm"],
> }
>
> ssh_authorized_key { $username:
> user => "$username",
> type => "$sshkeytype",
> key => "$sshkey",
> require => user["$username"],
> }
> }
> }
>
> class admin_user {
> include admin_user::group, admin_user::list, admin_user::add
> }
>
> The error message:
> Error: Could not create user user1: Execution of '/usr/sbin/useradd -u
> 1059 -s /bin/bash -g 888 -d /export/home/user1 -c user1 -m user1' returned
> 12: UX: /usr/sbin/useradd: ERROR: Unable to create the home directory: No
> such file or directory.
>
> Error: /User[user1]/ensure: change from absent to present failed: Could
> not create user user1: Execution of '/usr/sbin/useradd -u 1059 -s /bin/bash
> -g 888 -d /export/home/user1 -c user1 -m user1' returned 12: UX:
> /usr/sbin/useradd: ERROR: Unable to create the home directory: No such file
> or directory.
>
> If i execute:
> /usr/sbin/useradd -u 1059 -s /bin/bash -g 888 -d /home/user1 -c user1 -m
> user1
> it does work.
>
> Does somebody have an idea?
>
> Best regards,
> Andreas
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.