added primary group to profile
This commit is contained in:
parent
acf1ffc508
commit
29780c98c0
|
@ -1,9 +1,10 @@
|
||||||
??? 1.0.1
|
??? 1.0.1
|
||||||
- LAM can now be installed with "configure" and "make install"
|
- LAM can now be installed with "configure" and "make install"
|
||||||
- Samba 3: readded time zone selection for logon hours
|
|
||||||
- Unix: merged password hash settings for Unix users and groups
|
- Unix: merged password hash settings for Unix users and groups
|
||||||
|
- Samba 3: added Windows group to profile options
|
||||||
- fixed bugs:
|
- fixed bugs:
|
||||||
-> Samba 3: hash values were wrong in some rare cases (1440021)
|
-> Samba 3: hash values were wrong in some rare cases (1440021)
|
||||||
|
-> Samba 3: readded time zone selection for logon hours (1407761)
|
||||||
-> Unix: call of unknown function (1450464)
|
-> Unix: call of unknown function (1450464)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -809,7 +809,7 @@ class sambaSamAccount extends baseModule {
|
||||||
}
|
}
|
||||||
elseif ($this->attributes['sambaDomainName'][0]!='') {
|
elseif ($this->attributes['sambaDomainName'][0]!='') {
|
||||||
if ($this->attributes['sambaDomainName'][0] == $sambaDomains[$i]->name) {
|
if ($this->attributes['sambaDomainName'][0] == $sambaDomains[$i]->name) {
|
||||||
$SID = $domainSID;
|
$SID = $sambaDomains[$i]->SID;
|
||||||
$sel_domain = $sambaDomains[$i]->name;
|
$sel_domain = $sambaDomains[$i]->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1149,6 +1149,17 @@ class sambaSamAccount extends baseModule {
|
||||||
1 => array('kind' => 'select', 'name' => 'sambaSamAccount_sambaDomainName', 'options' => $sambaDomainNames, 'options_selected' => array()),
|
1 => array('kind' => 'select', 'name' => 'sambaSamAccount_sambaDomainName', 'options' => $sambaDomainNames, 'options_selected' => array()),
|
||||||
2 => array('kind' => 'help', 'value' => 'domain')
|
2 => array('kind' => 'help', 'value' => 'domain')
|
||||||
);
|
);
|
||||||
|
// Windows group
|
||||||
|
$groups = array();
|
||||||
|
foreach ($this->rids as $key => $value) {
|
||||||
|
$groups[] = array($value, $key);
|
||||||
|
}
|
||||||
|
$groups[] = array("-", "-");
|
||||||
|
$return[] = array(
|
||||||
|
0 => array('kind' => 'text', 'text' => _('Windows group') . ': '),
|
||||||
|
1 => array('kind' => 'select', 'name' => 'sambaSamAccount_group', 'options' => $groups, 'options_selected' => array('513'), 'descriptiveOptions' => true),
|
||||||
|
2 => array('kind' => 'help', 'value' => 'group')
|
||||||
|
);
|
||||||
// logon hours
|
// logon hours
|
||||||
$return[] = array(
|
$return[] = array(
|
||||||
0 => array('kind' => 'text', 'text' => _('Logon hours') . ': '),
|
0 => array('kind' => 'text', 'text' => _('Logon hours') . ': '),
|
||||||
|
@ -1243,6 +1254,25 @@ class sambaSamAccount extends baseModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// primary group
|
||||||
|
if (isset($profile['sambaSamAccount_sambaDomainName'][0])) {
|
||||||
|
$domains = search_domains();
|
||||||
|
$domSID = '';
|
||||||
|
// find domain SID
|
||||||
|
for ($i = 0; $i < sizeof($domains); $i++) {
|
||||||
|
if ($domains[$i]->name == $profile['sambaSamAccount_sambaDomainName'][0]) {
|
||||||
|
$domSID = $domains[$i]->SID;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($domSID != '') {
|
||||||
|
// set primary group if selected
|
||||||
|
if (isset($profile['sambaSamAccount_group'][0]) && ($profile['sambaSamAccount_group'][0] != "-")) {
|
||||||
|
$this->attributes['sambaPrimaryGroupSID'][0] = $domSID . "-" . $profile['sambaSamAccount_group'][0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue