diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 8c4917ef..7a0d36ba 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -2299,8 +2299,7 @@ function creategroup($values, $uselamdaemon=true) { if ($values->smb_displayName) $attr['displayName'] = utf8_encode($values->smb_displayName); } // Write additional group members - if (is_array($values->unix_memberUid)) foreach ($values->unix_memberUid as $user) - $attr['memberUid'][] = $user; + if (is_array($values->unix_memberUid)) $attr['memberUid'][] = $values->unix_memberUid; // Create LDAP group account $success = ldap_add($_SESSION['ldap']->server(),$values->general_dn, $attr); // Continue if now error did ocour @@ -2309,7 +2308,7 @@ function creategroup($values, $uselamdaemon=true) { if ($_SESSION['config']->scriptServer && is_array($values->quota) && $uselamdaemon) setquotas(array($values)); // Add new group to cache-array if ((isset($_SESSION['groupDN']))) { - $_SESSION['groupDN'][$dn]['memberUid'] = $user; + $_SESSION['groupDN'][$values->general_dn]['memberUid'] = $values->unix_memberUid; $_SESSION['groupDN'][$values->general_dn]['cn'] = $values->general_username; $_SESSION['groupDN'][$values->general_dn]['uidNumber'] = $values->general_uidNumber; } diff --git a/lam/lib/lamdaemon.pl b/lam/lib/lamdaemon.pl index 5d0ade54..b8e494e2 100755 --- a/lam/lib/lamdaemon.pl +++ b/lam/lib/lamdaemon.pl @@ -216,6 +216,7 @@ else { $ssh->login($username[0], $password); foreach $string2 ( @string ) { ($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string2); - print "$stdout"; + $return .= $stdout; } + print "$return"; }