We are just started with cfengine and want to use the current logged in username of Ubuntu in our scripts.
"cur_user" string => execresult("/usr/bin/id -un","noshell")
This returns the current user. But as you now cfengine runs in the background as root which results in always the same answer and that's root.
Is their a predefined thing or is their something you guys now?
Kr,
Joeri