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?
PS: exec { "touch /root/a.test":} is successful, so it is indeed executing as root.
PS2: I get the exact same problem when executing "apt-get autoremove"