diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-create-unix e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/group-create-unix --- e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-create-unix 2010-12-29 19:10:34.000000000 +0100 +++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/group-create-unix 2011-03-03 20:38:15.000000000 +0100 @@ -115,7 +115,6 @@ "/usr/sbin/cpu", "-C/etc/cpu-system.conf", "useradd", "-u", $uid, "-g", $gid, - "-c", $description, "-d", "/home/e-smith", "-s", @@ -123,6 +122,17 @@ "$groupName" ) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) user $groupName.\n" ); +# Set the cn of the dummy user account (in ldap) +$tmpattr = File::Temp->new(); +print $tmpattr "cn: $description\n"; +$tmpattr->flush(); +system( + "/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod", + "-a", $tmpattr, + "$groupName" + ) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to update (ldap) user $groupName.\n" ); +undef $tmpattr; + # Release lock if we have one $lock && esmith::lockfile::UnlockFile($lock); diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/group-modify-unix --- e-smith-base-5.2.0/root/etc/e-smith/events/actions/group-modify-unix 2010-12-29 19:10:34.000000000 +0100 +++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/group-modify-unix 2011-03-03 20:29:22.000000000 +0100 @@ -78,10 +78,13 @@ or ( $x = 255, warn "Failed to modify (unix) group description for $groupName.\n" ); } - system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod", "-c", "$groupDesc", "$groupName") == 0 + my $tmpattr = File::Temp->new(); + print $tmpattr "cn: $groupDesc\n"; + $tmpattr->flush(); + system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod", "-a", "$tmpattr", "$groupName") == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to modify (ldap) group description for $groupName.\n" ); - my $tmpattr = File::Temp->new(); + $tmpattr = File::Temp->new(); print $tmpattr "mail: $groupName\@$domain\n"; print $tmpattr "description: $groupDesc\n"; $tmpattr->flush(); diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/init-accounts e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/init-accounts --- e-smith-base-5.2.0/root/etc/e-smith/events/actions/init-accounts 2010-12-29 19:10:34.000000000 +0100 +++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/init-accounts 2011-03-07 15:46:22.000000000 +0100 @@ -54,7 +54,7 @@ { if ($ldapauth eq 'enabled') { - `/usr/sbin/cpu useradd -c 'e-smith administrator' -d /home/e-smith -G shared -M -s /sbin/e-smith/console admin`; + `/usr/sbin/cpu useradd -f 'e-smith' -E 'administrator' -d /home/e-smith -G shared -M -s /sbin/e-smith/console admin`; `/usr/bin/gpasswd -a admin root`; } else @@ -103,7 +103,7 @@ $groups = join (',', sort (@groupList)); if ($ldapauth eq 'enabled') { - $cmd = "/usr/sbin/cpu usermod -c 'e-smith administrator' -d /home/e-smith -G '$groups' -s /sbin/e-smith/console admin"; + $cmd = "/usr/sbin/cpu usermod -f 'e-smith' -E 'administrator' -d /home/e-smith -G '$groups' -s /sbin/e-smith/console admin"; } else { @@ -135,7 +135,7 @@ { if ($ldapauth eq 'enabled') { - `/usr/sbin/cpu useradd -c 'e-smith web server' -d /home/e-smith -G shared -M -s /bin/false www`; + `/usr/sbin/cpu useradd -f 'e-smith' -E 'web server' -d /home/e-smith -G shared -M -s /bin/false www`; } else { @@ -176,7 +176,7 @@ $groups = join (',', sort (@groupList)); if ($ldapauth eq 'enabled') { - `/usr/sbin/cpu usermod -c 'e-smith web server' -d /home/e-smith -G '$groups' -s /bin/false www`; + `/usr/sbin/cpu usermod -f 'e-smith' -E 'web server' -d /home/e-smith -G '$groups' -s /bin/false www`; } else { diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/user-create-unix --- e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix 2010-12-29 19:10:34.000000000 +0100 +++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/user-create-unix 2011-02-24 20:39:11.000000000 +0100 @@ -119,7 +119,6 @@ "/usr/sbin/cpu", "useradd", "-u", $uid, "-g", $gid, - "-c", "$first $last", "-f", "$first", "-E", "$last", "-e", "$userName\@$domain", diff -Nur e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/user-modify-unix --- e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix 2010-12-29 19:10:34.000000000 +0100 +++ e-smith-base-5.2.0_mod/root/etc/e-smith/events/actions/user-modify-unix 2011-02-24 20:39:31.000000000 +0100 @@ -101,7 +101,7 @@ or ( $x = 255, warn "Failed to modify comment of (unix) account $userName.\n" ); } - system("/usr/sbin/cpu", "usermod", "-c", "$first $last", "-f", "$first", "-E", "$last", $userName) == 0 + system("/usr/sbin/cpu", "usermod", "-f", "$first", "-E", "$last", $userName) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to modify comment/name of (ldap) account $userName.\n" ); }