password is not setting up in /etc/shadow included libshadow on ubuntu 12.04 client

35 views
Skip to first unread message

jyotir bhandari

unread,
Jan 29, 2014, 1:33:45 AM1/29/14
to puppet...@googlegroups.com
Hi

I have been trying to set password on ubuntu 12.04 which is client. All the neccessary packages of ruby already exists.

Password is not setting up in /etc/shadow. User creation is working just fine.

init.pp

class accounts {
       
        package {'ruby-shadow':
                 name => 'libshadow-ruby1.8',
                 ensure => installed,
                }
 
   @accounts::system { 'demo':
       comment      => 'demo users',
       password     => '$6$salt$gUxP.t8.YpGkzSXlD5XOUBFAI7Jeat2pRraF7S2ycm36qprk76ihcTCqtgS3YS/dMk9j0EXIK..ZnVqi5YBKs1',
       require => Package['ruby-shadow'],
   }
}

system.pp

define accounts::system ($comment,$password) {
user { $title:
       ensure => 'present',
       shell => '/bin/bash',
       managehome => true,
     }
}


Jyotir

jyotir bhandari

unread,
Jan 29, 2014, 6:57:52 AM1/29/14
to puppet...@googlegroups.com
Anyone who faced this type of issue.

Jyotit

Fiddyspence

unread,
Jan 29, 2014, 7:13:52 AM1/29/14
to puppet...@googlegroups.com
Your code doesn't actually set the password attribute on the user in the defined resource, so it won't be set.
Reply all
Reply to author
Forward
0 new messages