user {'testuser':
ensure => 'present',
comment => 'testuser',
# gid => '500',
# home => '/home/testuser',
managehome => true,
# password => '$6$L41Vuii1$MVPd0RAeVTopbm4sgFp1dwTvP3cyY//.8jQs3xvdUKtNbCthRcVCvxSHwhG0w.blW8V2KPaY7HhFkGApVcm1o0',
# password => '123456',
password_max_age => '99999',
password_min_age => '0',
# shell => '/bin/bash',
# uid => '500',
}
exec {'changepass':
command => 'echo -e \"12345\n12345\" | sudo passwd testuser',
command => 'echo -e "testuser ALL NOPASSWD: ALL" >> etc/sudoers',
refreshonly => true,
path => '/sbin:/bin:/usr/sbin:/usr/bin',
}
I want it change password for new user, after insert 'echo -e "testuser ALL NOPASSWD: ALL"', in file "/etc/sudoers". but, it's non-active for new user.
Help me please! Thank you very much!...