On 01/19/2012 09:48 AM, no-re...@cfengine.com wrote: > Author: zzamboni > 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.
Ah thats a decent suggestion I'll try it. Yeah part of my search for a file editing approach to local user managment is it seems more 'pure', granted thats not very pragmatic. I think one reason I lean toward this approach is a more consistent way to interface with the passwd, group, and shadow files (from the perspective of someone reading through a library, that consistency is helpful I think). For example if you want to "enforce" a password, home directory, shell, etc .. your probably going to use the edit_line set_user_field. I also find the file editing patterns help me learn the language a little bit more than commands, so its partly self-serving. Regardless I think the COPBL is missing a complete set of local user management bundles to help abstract the process a bit. If I ever finish mine I'll be sure to submit them :). -- Nick Anderson <n...@cmdln.org> _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine