Forum: CFEngine Help
Subject: Re: CFEngine Help: User Management
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,24589,24590#msg-24590

Nick, thanks for the mention. Just for reference, an up-to-date version of my 
create_users() bundle (which is used in my book - I think for now it's 
identical to the one you linked to, but it may change) is here: 
http://cf-learn.info/code/ch04/sys_create_users.cf.html

I couldn't figure out a way to compute days-since-epoch without spawning a 
process. But perl is a relatively heavyweight process. Maybe this could be used 
instead:

expr `date +%s` / 86400


Not sure if it would really be lighter, since now we have two processes (expr 
and date).

I personally don't like the direct-file-editing approach to managing users, 
because it is highly system-dependent, and it only works for local users. By 
using commands, you ensure that the system does whatever housekeeping tasks 
need to be done, and it could conceivably be used to manage any kind of users.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to