reparing user list on a linux system using cfengine

125 views Asked by At

I need to create a cfengine policy which automatically maintains a user list on a linux box. If there are additional users on the system except the list, it would delete them. I am a newbie to cfengine. Any pointers would be immensely appreciated. Also let me know if i am trying to solve the problem in a wrong way.

1

There are 1 answers

0
Diego Zamboni On

You can use the new users: promise type in CFEngine 3.6.0 to manage local user accounts.

You can use the getusers() function to get a list of all the users on the system, and then iterate through it to determine which users need to be added or deleted.

Hope this helps you get started.