Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Forcing user to change his unix login password

$
0
0
I am using `users' resource to create unix accounts and then set a default password. For this I have written the following manifest . node 'node2.example.com','node3.example.com' { user { 'askar': ensure => 'present', managehome => 'true', comment => 'man Home', home => '/home/askar', shell => '/bin/bash', expiry => '2016-03-22', password => '$1$cs1j/t.D$4Q2Ocr0pulyNTUx/', password_min_age => '30', password_max_age => '60', } } It works fine, but I want the user should be forced to change his password at next login. For this I extended the rule with an exec resource to run the following command `chage -d 0 askar` so that the user is forced to change the password exec { 'chage': command => 'chage -d 0 askar' } } But this is not working for me. Can you please suggest how can I get a user forced to change his password at next login .

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>