how to define groups_secondary in users
Jerome Jean Verleyen <[email protected]>
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
Dear all
I'm trying to define users in a server. As there will be more than one, i
want to use de auto-loop capabilities of Cfengine to create the users.
Howerver, i face an issue when i try to create a first user. I could not
give the slist of gropus_secondary as an slist, Cfengine declare that it's
a scalar.
Here an excerpt of the code
vars:
"users[jerome][policy]" string => "present";
"users[jerome][uid]" string => "1001";
"users[jerome][group_primary]" string => "uusmb";
"users[jerome][groups_secondary]" slist => {"academico"};
"l_users" slist => getindices("users");
users:
am_policy_hub::
"$(l_users)"
policy => "$(users[$(l_users)][policy])",
uid => "$(users[$(l_users)][uid])",
group_primary => "$(users[$(l_users)][group_primary])",
groups_secondary => "$(users[$(l_users)][groups_secondary])";
That's get me back this error:
... error: Attempted to give a scalar to a non-scalar type groups_secondary
=> "$(users[$(l_users)][groups_secondary])",
As $(users[$(l_users)][groups_secondary]) should get me back an slist, i
could not understand where is my error.
Hopes someone could explain me.
Have a great day!
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/help-cfengine/c2d12ee1-566c-4f83-850b-fc719b546cd4n%40googlegroups.com.