Puppet Exec fails executing useradd
Posted
by
chris
on Server Fault
See other posts from Server Fault
or by chris
Published on 2011-11-29T11:35:17Z
Indexed on
2011/11/29
17:52 UTC
Read the original article
Hit count: 302
puppet
From what I understand, puppetd runs as root. As root, I launch
puppetd --onetime --no-daemonize --verbose
So I don't understand why this doesn't work:
exec { "useradd -m testuser":
path => "/bin:/usr/bin",
}
I just get:
...Exec[useradd -m testuser]/returns: change from notrun to 0 failed:useradd -m testuser returned 1 instead of one of [0] at...
If I execute the command directly, it works just fine.
Any ideas?
© Server Fault or respective owner