Solaris (sparc and i86) error while password change


My recipe to update root password,

user ‘root’ do

password '$1$xRttNfmg$kiGAjD0nRQkFXyE5432ci'


throws this error, BUT /etc/shadow file is updated properly

chef-solo -c client.rb -j runlist.json

Starting Chef Client, version 11.12.8

Compiling Cookbooks…

Converging 1 resources

Recipe: base::default

  • user[root] action create (up to date)


Error executing action create on resource ‘user[root]’


Ran [“usermod”, “root”] returned 2

[2014-07-15T11:01:20-07:00] FATAL: Chef::Exceptions::ChildConvergeError:
Chef run process exited unsuccessfully (exit code 1)

checking the code,

def manage_user

manage_password  ->  write_shadow_file                 *# WORKS GOOD*

*# parent's shell_out fails*



def manage_user

shell_out!(*command)                                             *#

command CONTAINS [“usermod”, “root”] fails with return code non-zero*


I think this is same as

and it says Resolution:Fixed,

Can somebody advice if I am doing anything wrong ? Is there a workaround
for this ? should I write lwrp/provider of my own ? Please advice.