Hi all,

Can someone tell me what is the reason for the pw user provider not 
supporting the password parameter?  As far as I know one can pipe an 
encrypted password string to pw and it will set it as expected.

As a workaround I'm using an exec to achieve this functionality:

define users::freebsd_user($gid, $uid, $comment, $password, $shell) {

    user { $name:
        ensure      => present,
        comment  => $comment,
        gid            => $gid,
        uid            => $uid,
        password => $password,
        shell         => $shell,
        notify       => Exec["passwd_$name"];
    }

    exec { "passwd_$name":
        path              => "/bin:/sbin:/usr/bin:/usr/sbin",
        command     => "echo '$password' | /usr/sbin/pw usermod $name -H 0",
        refreshonly => "true";
    }
}


However it would be cleaner if the built-in type supported this.  Is 
there a technical reason why this wasn't done?


Cheers,


Andrew.

-- 
.   __/_/_  w: http://darq.com/
.  __/_/_   t: 020 7100 1447
.   / /     e: [email protected]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to