Issue #1945 has been updated by Rahul Gopinath.

Status changed from Needs More Information to Accepted

Here is a 
[patch](https://github.com/vrthra/puppet/commit/871f763e5d296a2ea609fb56abf1ce34931958b0)
 to enable this feature.
----------------------------------------
Feature #1945: Add account lock and unlock support for useradd on solaris
https://projects.puppetlabs.com/issues/1945#change-70175

Author: Grant Diffey
Status: Accepted
Priority: Normal
Assignee: Grant Diffey
Category: Solaris
Target version: 
Affected Puppet version: 0.24.8
Keywords: Solaris useradd user
Branch: 


Solaris creates all new accounts where a password has not been specified as 
locked.

currently we have the following horrible define for users who we want to create 
but authenticate over ldap.

<pre>
        define user_homedir ($group, $fullname, $ingroups, $base, $id, 
$isPresent = present ) {
                @user { "$name":
                        ensure => $isPresent,
                               comment => "$fullname",
                               gid => "$group",
                               uid => $id,
                               groups => $ingroups,
                               membership => minimum,
                               shell => "/bin/sh",
                               home => "$base/$name",
                               managehome => true,
                               require => [Group[$group],File[$base]],
                               notify => Exec["unlock$name"],
                }

                ## WARNING WARNING WARNING
                ## on solaris, passwd -u not only unlocks the account,
                ## but makes it require NO PASSWORD!!!!!!
                ## you want -N, really.....

                exec { "unlock$name":
                        command => $operatingsystem ? {
                                        solaris => "/usr/bin/passwd -N $name",
                                        default => "/bin/true"
                                },
                        onlyif => "/usr/bin/grep $name.*LK /etc/shadow"
                               #refreshonly => true,
                }
</pre>



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to