Puppet Exec fails executing useradd
- by chris
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?