O'Reilly logo

CFEngine 3 Beginner's Guide by Rajneesh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - user and group configuration

  1. Let's write a configuration file for adding a user and group on a client. We'll also change a few default values for this user such as his password, age, and so on. The user to be added is, say, Clark with complete name as Clark Kent, password as superman. This password expires after 60 days and the user starts getting a warning that the password is about to expire five days prior to the date of expiry.

    The following lines should be copied to a configuration file named addusergroup.cf, for instance:

    body common control { bundlesequence => { 'addusergroup'}; } bundle agent addusergroup { vars: "User_name" string => "clark" commands: "/usr/sbin/useradd" args => "clark", classes => satisfied(user_created); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required