diff -up smeserver-zarafa-0.9.0/root/etc/e-smith/templates/etc/zarafa/unix.cfg/unix.cfg.unix_plugin_fix smeserver-zarafa-0.9.0/root/etc/e-smith/templates/etc/zarafa/unix.cfg/unix.cfg --- smeserver-zarafa-0.9.0/root/etc/e-smith/templates/etc/zarafa/unix.cfg/unix.cfg.unix_plugin_fix 2010-05-22 17:47:04.000000000 +0100 +++ smeserver-zarafa-0.9.0/root/etc/e-smith/templates/etc/zarafa/unix.cfg/unix.cfg 2010-05-22 17:50:49.000000000 +0100 @@ -1,34 +1,53 @@ +{ +use esmith::AccountsDB +} ############################################################## # UNIX USER PLUGIN SETTINGS # -# Any of these directives that are required, are only required if the -# userplugin parameter is set to unix. - -# Charset used in /etc/passwd for the fullname of a user. Normally this -# is us-ascii, but this can differ according to your setup. -# The charset specified here must be supported by your iconv(1) -# setup. See iconv -l for all charsets. -fullname_charset = iso-8859-15 - -# Default email domain for constructing new users -# Required, no default -default_domain = { ${'zarafa-server'}{DomainName} || $DomainName; } - # The lowest user id that is considered a regular user # Optional, default = 1000 -min_user_uid = 5000 +min_user_uid = 101 # The highest user id that is considered a regular user # Optional, default = 10000 max_user_uid = 10000 +# A list of user ids that are not considered to be regular users +# Optional, default = empty +except_user_uids = { +$accounts = esmith::AccountsDB->open_ro or die "Could not open AccountsDB"; +{ +while (($name, $passwd, $uid, $gid, $quota, + $comment, $gcos, $dir, $shell) = getpwent()) +{ +$user = $accounts->get($name); + +$OUT .= "$uid " + unless $uid <= 101 or (defined $user and $user->prop('type') eq "user"); +} +} +} + # The lowest group id that is considered a regular group # Optional, default = 1000 min_group_gid = 5000 - -# The highest group id that is considered a regular group # Optional, default = 10000 max_group_gid = 10000 + +# A list of group ids that are not considered to be regular groups +# Optional, default = empty +except_group_gids = { +setpwent(); +while (($name, $passwd, $uid, $gid, $quota, + $comment, $gcos, $dir, $shell) = getpwent()) +{ +$group = $accounts->get($name); + +$OUT .= "$gid " + unless $gid < 5000 or (defined $group and $group->prop('type') eq "group"); +} +endpwent(); +} # Create a user as non-active when it has this unix shell non_login_shell = /bin/false