set user password ubuntu [closed]

asked 2014-07-13 13:49:47 -0600

Boedy gravatar image

updated 2014-07-14 16:13:43 -0600

I just started using Puppet this weekend and I'm liking it so far. I keep running into problems though. I've searched allot for this, but could not find a solution.

I'm trying to create a new user with a password. See code below. I'm using vagrant with the ubuntu precise64 box.

user { 'testuser':
    ensure => present,
    password => '$1$1O.gwTeF$CjhqFGsKhmt3Sc9X0v6ve.',
    provider => 'useradd'

The user get's created, but the password isn't set however. I know because the file: /etc/shadow shows me:


I also ran: sudo apt-get install libshadow-ruby1.8

What am I doing wrong?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by binford2k
close date 2018-07-20 18:48:34.443552


Are you making a new user? Or trying to update the password of an existing user? Try removing the 'provider' line.

spuder gravatar imagespuder ( 2014-07-14 12:09:46 -0600 )edit

Yes, I'm creating a new user. I started out without the provider line. Makes no difference.

Boedy gravatar imageBoedy ( 2014-07-14 16:11:21 -0600 )edit

can you attach the output of `puppet agent --debug --verbose`? This may tell us if puppet somehow does not recognize the `libshadow` feature or if something else is going wrong

Stefan gravatar imageStefan ( 2014-07-14 19:37:05 -0600 )edit