RELEASE 1.1.0

This commit is contained in:
Deon George
2009-06-30 20:46:00 +10:00
parent a08bc4e9e1
commit dd581eb5c8
191 changed files with 25012 additions and 10177 deletions

View File

@@ -23,18 +23,16 @@
<attribute id="gidNumber">
<display>GID Number</display>
<hint>Automatically determined</hint>
<value>=php.GetNextNumber(/,gid)</value>
<readonly>1</readonly>
<order>2</order>
<page>1</page>
<presubmit>=php.GetNextNumber(/,gid)</presubmit>
<spacer>1</spacer>
</attribute>
<attribute id="memberUid">
<array>10</array>
<maxvalnb>10</maxvalnb>
<display>Users</display>
<helper>
<location>side</location>
<!-- <value>=php.DrawChooserLink(memberUid,0)</value> -->
</helper>
<type>Dn</type>
<hidden>0</hidden>
<order>3</order>
<page>1</page>

View File

@@ -29,40 +29,37 @@
<attribute id="gidNumber">
<display>GID Number</display>
<hint>Automatically determined</hint>
<value>=php.GetNextNumber(/,gid)</value>
<readonly>1</readonly>
<order>3</order>
<page>1</page>
<presubmit>=php.GetNextNumber(/,gid)</presubmit>
<spacer>1</spacer>
</attribute>
<attribute id="sambaSID">
<display>Samba SID</display>
<option>=php.PickList(/,(objectClass=sambaDomain),sambaSID,%sambaSID% (%sambaDomainName%))</option>
<helper>
<id>sidsuffix</id>
<location>side</location>
<value></value>
</helper>
<post>=php.Join(-,(%sambaSID%,%sidsuffix%))</post>
<order>4</order>
<page>1</page>
<post>=php.Join(-,(%sambaSID%,%sidsuffix%))</post>
<value>=php.PickList(/,(objectClass=sambaDomain),sambaSID,%sambaSID% (%sambaDomainName%))</value>
</attribute>
<attribute id="sambaGroupType">
<default>2</default>
<display>Samba Group Type</display>
<option id="2">Domain Group</option>
<option id="4">Local Group</option>
<option id="5">Well-known Group</option>
<value>2</value>
<order>5</order>
<page>1</page>
<spacer>1</spacer>
<value id="2">Domain Group</value>
<value id="4">Local Group</value>
<value id="5">Well-known Group</value>
</attribute>
<attribute id="memberUid">
<array>10</array>
<maxvalnb>10</maxvalnb>
<display>Users</display>
<helper>
<location>side</location>
<!-- <value>=php.DrawChooserLink(memberUid,0)</value> -->
</helper>
<type>Dn</type>
<hidden>0</hidden>
<order>10</order>
<page>1</page>

View File

@@ -19,11 +19,6 @@
<attributes>
<attribute id="aliasedObjectName">
<display>Alias To</display>
<helper>
<display></display>
<location>side</location>
<value>=php.DrawChooserLink(aliasedObjectName,0)</value>
</helper>
<order>1</order>
<page>1</page>
</attribute>

View File

@@ -16,83 +16,90 @@
</objectClasses>
<attributes>
<attribute id="uid">
<display>User ID</display>
<icon>images/uid.png</icon>
<onchange>autoFill:homeDirectory,/home/users/%uid%</onchange>
<attribute id="givenName">
<display>Given Name</display>
<onchange>autoFill:cn,%givenName% %sn%</onchange>
<onchange>autoFill:uid,%gidNumber|0-0/T%-%givenName|0-1/l%%sn/l%</onchange>
<order>1</order>
<page>1</page>
</attribute>
<attribute id="mail">
<display>Email</display>
<icon>images/mail.png</icon>
<order>2</order>
<page>1</page>
</attribute>
<attribute id="mailbox">
<display>Mailbox</display>
<order>3</order>
<page>1</page>
<spacer>1</spacer>
<spacer>1</spacer>
</attribute>
<attribute id="sn">
<display>Last name</display>
<onchange>autoFill:cn,%givenName% %sn%</onchange>
<onchange>autoFill:uid,%gidNumber|0-0/T%-%givenName|0-1/l%%sn/l%</onchange>
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
<order>4</order>
<order>2</order>
<page>1</page>
</attribute>
<attribute id="cn">
<display>Common Name</display>
<order>5</order>
<order>3</order>
<page>1</page>
<spacer>1</spacer>
</attribute>
<attribute id="uid">
<display>User ID</display>
<icon>images/uid.png</icon>
<!--<onchange>autoFill:homeDirectory,/home/users/%uid%</onchange>-->
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
<order>4</order>
<page>1</page>
</attribute>
<attribute id="uidNumber">
<display>UID Number</display>
<hint>Automatically determined</hint>
<icon>images/terminal.png</icon>
<value>=php.GetNextNumber(/,uid)</value>
<readonly>1</readonly>
<order>6</order>
<page>1</page>
<presubmit>=php.GetNextNumber(/,uid)</presubmit>
</attribute>
<attribute id="gidNumber">
<display>GID Number</display>
<onchange>autoFill:uid,%gidNumber|0-0/T%-%givenName|0-1/l%%sn/l%</onchange>
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
<option>=php.PickList(/,(objectClass=posixGroup),gidNumber,%cn%)</option>
<order>7</order>
<page>1</page>
<value>=php.PickList(/,(objectClass=posixGroup),gidNumber,%cn%)</value>
<spacer>1</spacer>
</attribute>
<attribute id="homeDirectory">
<display>Home Directory</display>
<order>8</order>
<page>1</page>
<spacer>1</spacer>
</attribute>
<attribute id="mail">
<display>Email</display>
<icon>images/mail.png</icon>
<order>9</order>
<page>1</page>
</attribute>
<attribute id="mailbox">
<display>Mailbox</display>
<order>10</order>
<page>1</page>
</attribute>
<attribute id="userPassword">
<display>Password</display>
<helper>
<default>md5</default>
<display>Encryption</display>
<id>enc</id>
<location>side</location>
<value>blowfish</value>
<value>clear</value>
<value>crypt</value>
<value>ext_des</value>
<value>md5</value>
<value>md5crypt</value>
<value>sha</value>
<value>smd5</value>
<value>ssha</value>
</helper>
<icon>images/lock.png</icon>
<order>9</order>
<page>1</page>
<post>=php.Password(%enc%,%userPassword%)</post>
<type>password</type>
<verify>1</verify>
<helper>
<display>Encryption</display>
<id>enc</id>
<option>blowfish</option>
<option>clear</option>
<option>crypt</option>
<option>ext_des</option>
<option>md5</option>
<option>md5crypt</option>
<option>sha</option>
<option>smd5</option>
<option>ssha</option>
<value>md5</value>
</helper>
<post>=php.Password(%enc%,%userPassword%)</post>
<order>11</order>
<page>1</page>
</attribute>
</attributes>
</template>

View File

@@ -1,280 +0,0 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/custom.php,v 1.46 2006/04/29 06:49:32 wurley Exp $
$rdn = isset($_POST['rdn']) ? $_POST['rdn'] : null;
$container = $_POST['container'];
$step = isset($_POST['step']) ? $_POST['step'] : 1;
if (! $ldapserver->haveAuthInfo())
pla_error(_('Not enough information to login to server. Please check your configuration.'));
if ($step == 1) {
$oclasses = $ldapserver->SchemaObjectClasses();
if (! $oclasses || ! is_array($oclasses))
pla_error("Unable to retrieve the schema from your LDAP server. Cannot continue with creation.");
printf('<h4>%s</h4>',_('Step 1 of 2: Name and ObjectClass(es)'));
echo '<form action="template_engine.php" method="post" name="creation_form">';
echo '<input type="hidden" name="step" value="2" />';
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
printf('<input type="hidden" name="template" value="%s" />',htmlspecialchars($_POST['template']));
echo '<table class="create">';
echo '<tr>';
printf('<td class="heading"><acronym title="%s">%s</acronym>:</td>',_('Relative Distinguished Name'),_('RDN'));
printf('<td><input type="text" name="rdn" value="%s" size="30" /> %s</td>',htmlspecialchars($rdn),_('(example: cn=MyNewPerson)'));
echo '</tr><tr>';
printf('<td class="heading">%s</td>',_('Container'));
printf('<td><input type="text" name="container" size="40" value="%s" />',htmlspecialchars($container));
draw_chooser_link('creation_form.container');
echo '</td>';
echo '</tr><tr>';
printf('<td class="heading">%s</td>',_('ObjectClasses'));
echo '<td><select name="object_classes[]" multiple="true" size="15">';
foreach ($oclasses as $name => $oclass) {
if (0 == strcasecmp('top',$name))
continue;
printf('<option %s value="%s">%s</option>',
($oclass->getType() == 'structural') ? 'style="font-weight: bold" ' : '',
htmlspecialchars($oclass->getName()),htmlspecialchars($oclass->getName()));
}
echo '</select>';
echo '</td>';
echo '</tr>';
if ($config->GetValue('appearance','show_hints'))
printf('<tr><td></td><td><small><img src="images/light.png" /><span class="hint">%s</span></small><br /></td></tr>',
_('Hint: You must choose exactly one structural objectClass (shown in bold above)'));
printf('<tr><td></td><td><input type="submit" value="%s" /></td></tr>',_('Proceed &gt;&gt;'));
echo '</table>';
echo '</form>';
} elseif ($step == 2) {
strlen(trim($rdn)) != 0 or
pla_error(_('You left the RDN field blank.'));
if (strlen(trim($container)) == 0 or
(! $ldapserver->dnExists($container) && ! in_array("$rdn,$container",$ldapserver->getBaseDN())))
pla_error(sprintf(_('The container you specified (%s) does not exist. Please try again.'),htmlspecialchars($container)));
$friendly_attrs = process_friendly_attr_table();
$oclasses = isset($_POST['object_classes']) ? $_POST['object_classes'] : null;
if (count($oclasses) == 0)
pla_error(_('You did not select any ObjectClasses for this object. Please go back and do so.'));
$dn = trim($container) ? $rdn.','.$container : $rdn;
# incrementally build up the all_attrs and required_attrs arrays
$schema_oclasses = $ldapserver->SchemaObjectClasses();
$required_attrs = array();
$all_attrs = array();
foreach ($oclasses as $oclass_name) {
$oclass = $ldapserver->getSchemaObjectClass($oclass_name);
if ($oclass) {
$required_attrs = array_merge($required_attrs,$oclass->getMustAttrNames($schema_oclasses));
$all_attrs = array_merge($all_attrs,$oclass->getMustAttrNames($schema_oclasses),$oclass->getMayAttrNames($schema_oclasses));
}
}
$required_attrs = array_unique($required_attrs);
$all_attrs = array_unique($all_attrs);
remove_aliases($required_attrs,$ldapserver);
remove_aliases($all_attrs,$ldapserver);
sort($required_attrs);
sort($all_attrs);
# remove required attrs from optional attrs
foreach ($required_attrs as $i => $attr_name) {
$key = array_search($attr_name,$all_attrs);
if (is_numeric($key))
unset($all_attrs[$key]);
}
# remove binary attributes and add them to the binary_attrs array
$binary_attrs = array();
foreach ($all_attrs as $i => $attr_name) {
if ($ldapserver->isAttrBinary($attr_name)) {
unset($all_attrs[$i]);
$binary_attrs[] = $attr_name;
}
}
/* If we trim any attrs out above, then we will have a gap in the index
sequence and will get an "undefined index" error below. This prevents
that from happening. */
$all_attrs = array_values($all_attrs);
/* add the required attribute based on the RDN provided by the user
(ie, if the user specifies "cn=Bob" for their RDN, make sure "cn" is
in the list of required attributes. */
$rdn_attr = trim(substr($rdn,0,strpos($rdn,'=')));
$rdn_value = trim(substr($rdn,strpos($rdn,'=')+1));
$rdn_value = @pla_explode_dn($rdn);
$rdn_value = @explode('=',$rdn_value[0],2);
$rdn_value = @$rdn_value[1];
if (in_array($rdn_attr,$all_attrs) && ! in_array($rdn_attr,$required_attrs))
$required_attrs[] = $rdn_attr;
printf('<h4>%s</h4>',_('Step 2 of 2: Specify attributes and values'));
echo '<form action="create.php" method="post" enctype="multipart/form-data">';
echo '<input type="hidden" name="step" value="2" />';
printf('<input type="hidden" name="new_dn" value="%s" />',htmlspecialchars($dn));
printf('<input type="hidden" name="new_rdn" value="%s" />',htmlspecialchars($rdn));
printf('<input type="hidden" name="container" value="%s" />',htmlspecialchars($container));
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
printf('<input type="hidden" name="object_classes" value="%s" />',rawurlencode(serialize($oclasses)));
echo '<table class="edit_dn" cellspacing="0">';
printf('<tr><th colspan="2">%s</th></tr>',_('Required Attributes'));
if (count($required_attrs) == 0)
printf('<tr class="row1"><td colspan="2"><center>(%s)</center></td></tr>',_('none'));
else
foreach ($required_attrs as $count => $attr) {
echo '<tr>';
# is there a user-friendly translation available for this attribute?
if (isset($friendly_attrs[strtolower($attr)]))
$attr_display = sprintf('<acronym title="%s: \'%s\' %s \'%s\'">%s</acronym>',
_('Note'),htmlspecialchars($attr),_('is an alias for'),
htmlspecialchars($friendly_attrs[strtolower($attr)]),
htmlspecialchars($friendly_attrs[strtolower($attr)]));
else
$attr_display = htmlspecialchars($attr);
printf('<td class="attr"><b>%s</b></td>',$attr_display);
echo '</tr><tr>';
printf('<td class="val"><input type="%s" name="required_attrs[%s]" value="%s" size="40" />',
($ldapserver->isAttrBinary($attr) ? 'file' : 'text'),
htmlspecialchars($attr),($attr == $rdn_attr ? htmlspecialchars($rdn_value) : ''));
echo '</tr>';
}
printf('<tr><th colspan="2">%s</th></tr>',_('Optional Attributes'));
if (count($all_attrs) == 0)
printf('<tr><td colspan="2"><center>(%s)</center></td></tr>',_('none'));
else {
for ($i=0;$i<min(count($all_attrs),10);$i++) {
$attr = $all_attrs[$i];
printf('<tr><td class="attr"><select style="background-color: #ddd; font-weight: bold" name="attrs[%s]">%s</select></td></tr>',
$i,get_attr_select_html($all_attrs,$friendly_attrs,$attr));
printf('<tr><td class="val"><input type="text" name="vals[%s]" value="" size="40" /></tr>',$i);
}
}
if (count($binary_attrs) > 0) {
printf('<tr><th colspan="2">%s</th></tr>',_('Optional Binary Attributes'));
for ($k=$i;$k<$i+count($binary_attrs);$k++) {
$attr = $binary_attrs[$k-$i];
printf('<tr><td class="attr"><select style="background-color: #ddd; font-weight: bold" name="attrs[%s]">%s</select></td></tr>',
$k,get_binary_attr_select_html($binary_attrs,$friendly_attrs,$attr));
printf('<tr><td class="val"><input type="file" name="vals[%s]" value="" size="25" /></td></tr>',$k);
}
}
printf('<tr><td><center><input type="submit" name="submit" value="%s" /></center></td></tr>',_('Create Object'));
echo '</table>';
echo '</form>';
}
function get_attr_select_html($all_attrs,$friendly_attrs,$highlight_attr=null) {
$attr_select_html = "\n\n";
if (! is_array($all_attrs))
return null;
foreach ($all_attrs as $a) {
# is there a user-friendly translation available for this attribute?
if (isset($friendly_attrs[strtolower($a)]))
$attr_display = sprintf('%s (%s)',htmlspecialchars($friendly_attrs[strtolower($a)]),htmlspecialchars($a));
else
$attr_display = htmlspecialchars($a);
$a = htmlspecialchars($a);
$attr_select_html .= sprintf('<option value="%s"',$a);
if (0 == strcasecmp($highlight_attr,$a))
$attr_select_html .= ' selected';
$attr_select_html .= sprintf('>%s</option>',$attr_display);
}
return $attr_select_html;
}
function get_binary_attr_select_html($binary_attrs,$friendly_attrs,$highlight_attr=null) {
$binary_attr_select_html = '';
if (! is_array($binary_attrs))
return null;
if (count($binary_attrs) == 0)
return null;
foreach ($binary_attrs as $a) {
# is there a user-friendly translation available for this attribute?
if (isset($friendly_attrs[strtolower($a)]))
$attr_display = sprintf('%s (%s)',htmlspecialchars($friendly_attrs[strtolower($a)]),htmlspecialchars($a));
else
$attr_display = htmlspecialchars($a);
$binary_attr_select_html .= '<option';
if (0 == strcasecmp($highlight_attr,$a))
$binary_attr_select_html .= ' selected';
$binary_attr_select_html .= sprintf('>%s</option>',$attr_display);
}
return $binary_attr_select_html;
}
/**
* Removes attributes from the array that are aliases for eachother
* (just removes the second instance of the aliased attr)
*/
function remove_aliases(&$attribute_list,$ldapserver) {
# remove aliases from the attribute_list array
for ($i=0;$i<count($attribute_list);$i++) {
if (! isset($attribute_list[$i]))
continue;
$attr_name1 = $attribute_list[$i];
$attr1 = $ldapserver->getSchemaAttribute($attr_name1);
if (is_null($attr1))
continue;
for ($k=0;$k<count($attribute_list);$k++) {
if (! isset($attribute_list[$k]))
continue;
if ($i == $k)
continue;
$attr_name2 = $attribute_list[$k];
if ($attr1->isAliasFor($attr_name2))
unset($attribute_list[$k]);
}
}
$attribute_list = array_values($attribute_list);
}
?>

View File

@@ -19,7 +19,6 @@
<description>Domain Component</description>
<display>DC Name</display>
<order>1</order>
<override>dc</override>
<page>1</page>
</attribute>
<attribute id="associatedDomain">

View File

@@ -39,13 +39,13 @@
<page>1</page>
</attribute>
<attribute id="street">
<cols>50</cols>
<display>Street</display>
<icon>images/mail.png</icon>
<type>textarea</type>
<cols>50</cols>
<rows>4</rows>
<order>4</order>
<page>1</page>
<rows>4</rows>
<type>textarea</type>
</attribute>
<attribute id="l">
<display>City</display>

View File

@@ -36,27 +36,26 @@
</attribute>
<attribute id="userPassword">
<display>Password</display>
<helper>
<default>md5</default>
<display>Encryption</display>
<id>enc</id>
<location>side</location>
<value>blowfish</value>
<value>clear</value>
<value>crypt</value>
<value>ext_des</value>
<value>md5</value>
<value>md5crypt</value>
<value>sha</value>
<value>smd5</value>
<value>ssha</value>
</helper>
<icon>images/lock.png</icon>
<order>5</order>
<post>=php.Password(%enc%,%userPassword%)</post>
<spacer>1</spacer>
<type>password</type>
<verify>1</verify>
<helper>
<display>Encryption</display>
<id>enc</id>
<option>blowfish</option>
<option>clear</option>
<option>crypt</option>
<option>ext_des</option>
<option>md5</option>
<option>md5crypt</option>
<option>sha</option>
<option>smd5</option>
<option>ssha</option>
<value>md5</value>
</helper>
<post>=php.Password(%enc%,%userPassword%)</post>
<order>5</order>
<spacer>1</spacer>
</attribute>
<attribute id="title">

View File

@@ -19,14 +19,15 @@
<display>First name</display>
<icon>images/uid.png</icon>
<onchange>autoFill:cn,%givenName% %sn%</onchange>
<onchange>autoFill:uid,%givenName|0-1/l%%sn/l%</onchange>
<order>1</order>
<page>1</page>
</attribute>
<attribute id="sn">
<display>Last name</display>
<onchange>autoFill:cn,%givenName% %sn%</onchange>
<onchange>autoFill:uid,%gidNumber|0-0/T%-%givenName|0-1/l%%sn/l%</onchange>
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
<onchange>autoFill:uid,%givenName|0-1/l%%sn/l%</onchange>
<!-- <onchange>autoFill:homeDirectory,/home/users/%uid|0-1/l%/%uid%</onchange> -->
<order>2</order>
<page>1</page>
</attribute>
@@ -37,13 +38,14 @@
</attribute>
<attribute id="uid">
<display>User ID</display>
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
<onchange>autoFill:homeDirectory,/home/users/%uid%</onchange>
<order>4</order>
<page>1</page>
<spacer>1</spacer>
</attribute>
<attribute id="homeDirectory">
<display>Home directory</display>
<!-- <onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange> -->
<order>8</order>
<page>1</page>
</attribute>
@@ -53,45 +55,48 @@
<icon>images/terminal.png</icon>
<order>6</order>
<page>1</page>
<presubmit>=php.GetNextNumber(/,uid)</presubmit>
<value>=php.GetNextNumber(/,uid)</value>
<readonly>1</readonly>
</attribute>
<attribute id="gidNumber">
<display>GID Number</display>
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
<!-- <onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange> -->
<order>7</order>
<page>1</page>
<value>=php.PickList(/,(objectClass=posixGroup),gidNumber,%cn%)</value>
<option>=php.PickList(/,(objectClass=posixGroup),gidNumber,%cn%)</option>
</attribute>
<attribute id="loginShell">
<display>Login shell</display>
<order>9</order>
<page>1</page>
<value>=php.PickList(/,(objectClass=posixAccount),loginShell,%loginShell%)</value>
<!-- <option>=php.PickList(/,(objectClass=posixAccount),loginShell,%loginShell%)</option> -->
<option>/bin/sh</option>
<option>/bin/tsh</option>
<option>/bin/csh</option>
</attribute>
<attribute id="userPassword">
<display>Password</display>
<helper>
<default>md5</default>
<display>Encryption</display>
<id>enc</id>
<location>side</location>
<value>blowfish</value>
<value>clear</value>
<value>crypt</value>
<value>ext_des</value>
<value>md5</value>
<value>md5crypt</value>
<value>sha</value>
<value>smd5</value>
<value>ssha</value>
</helper>
<icon>images/lock.png</icon>
<order>5</order>
<page>1</page>
<post>=php.Password(%enc%,%userPassword%)</post>
<spacer>1</spacer>
<type>password</type>
<verify>1</verify>
<helper>
<display>Encryption</display>
<id>enc</id>
<option>blowfish</option>
<option>clear</option>
<option>crypt</option>
<option>ext_des</option>
<option>md5</option>
<option>md5crypt</option>
<option>sha</option>
<option>smd5</option>
<option>ssha</option>
<value>md5</value>
</helper>
<post>=php.Password(%enc%,%userPassword%)</post>
<order>5</order>
<page>1</page>
<spacer>1</spacer>
</attribute>
</attributes>
</template>

View File

@@ -24,13 +24,14 @@
<hint>Automatically determined</hint>
<order>2</order>
<page>1</page>
<presubmit>=php.GetNextNumber(/,gid)</presubmit>
<value>=php.GetNextNumber(/,gid)</value>
<readonly>1</readonly>
<spacer>1</spacer>
<!-- <value>=php.GetNextNumber(/,gid,false,(&amp;(objectClass=posixGroup)),*2;+1000)</value> -->
<!-- <option>=php.GetNextNumber(/,gid,false,(&amp;(objectClass=posixGroup)),*2;+1000)</option> -->
</attribute>
<attribute id="memberUid">
<display>Users</display>
<value>=php.MultiList(/,(objectClass=posixAccount),uid,%cn% (%uid|-4%))</value>
<!-- <option>=php.MultiList(/,(objectClass=posixAccount),uid,%cn% (%uid|-4%))</option> -->
<hidden>0</hidden>
<order>3</order>
<page>1</page>

View File

@@ -22,9 +22,9 @@
<attribute id="sambaSID">
<display>Samba SID</display>
<hint>Samba SID is in the format S-1-5-21-x-y-z</hint>
<value>S-1-5-21-</value>
<order>2</order>
<page>1</page>
<value>S-1-5-21-</value>
</attribute>
</attributes>
</template>

View File

@@ -28,36 +28,39 @@
<attribute id="gidNumber">
<display>GID Number</display>
<hint>Automatically determined</hint>
<value>=php.GetNextNumber(/,gid,true,(&amp;(objectClass=sambaDomain)(sambaDomainName=mysambadomain))</value>
<readonly>1</readonly>
<order>3</order>
<page>1</page>
<presubmit>=php.GetNextNumber(/,gid,true,(&amp;(objectClass=sambaDomain)(sambaDomainName=mysambadomain))</presubmit>
<spacer>1</spacer>
</attribute>
<attribute id="sambaSID">
<display>Samba SID</display>
<option>=php.PickList(/,(objectClass=sambaDomain),sambaSID,%sambaSID% (%sambaDomainName%))</option>
<helper>
<id>sidsuffix</id>
<value>=php.GetNextNumber(/,gid,false,(&amp;(objectClass=sambaDomain)(sambaDomainName=mysambadomain)),*2;+1000)</value>
<location>side</location>
<option>=php.GetNextNumber(/,gid,false,(&amp;(objectClass=sambaDomain)(sambaDomainName=mysambadomain)),*2;+1000)</option>
</helper>
<post>=php.Join(-,(%sambaSID%,%sidsuffix%))</post>
<order>4</order>
<page>1</page>
<post>=php.Join(-,(%sambaSID%,%sidsuffix%))</post>
<value>=php.PickList(/,(objectClass=sambaDomain),sambaSID,%sambaSID% (%sambaDomainName%))</value>
</attribute>
<attribute id="sambaGroupType">
<default>2</default>
<display>Samba Group Type</display>
<option id="2">Domain Group</option>
<option id="4">Local Group</option>
<option id="5">Well-known Group</option>
<value>2</value>
<order>5</order>
<page>1</page>
<spacer>1</spacer>
<value id="2">Domain Group</value>
<value id="4">Local Group</value>
<value id="5">Well-known Group</value>
</attribute>
<attribute id="memberUid">
<display>Users</display>
<value>=php.MultiList(/,(objectClass=posixAccount),uid,%cn% %uid|-4/U%,memberUid,dmdName=users:::dc=localdomain,root => cn=root; nobody => cn=nobody,cn,10,(&amp;(objectClass=posixAccount)(gidNumber=29999)),uid)</value>
<type>multiselect</type>
<option>=php.MultiList(/,(objectClass=posixAccount),uid,%cn% %uid|-4/U%,memberUid,dmdName=users:::dc=localdomain,root => cn=root; nobody => cn=nobody,cn,,,)</option>
<value>=php.MultiList(/,(&amp;(objectClass=posixAccount)(gidNumber=29999)),uid)</value>
<size>10</size>
<hidden>0</hidden>
<order>10</order>
<page>1</page>

View File

@@ -27,39 +27,39 @@
<attribute id="uidNumber">
<display>UID Number</display>
<hint>Automatically determined</hint>
<value>=php.GetNextNumber(/,uid)</value>
<readonly>1</readonly>
<order>2</order>
<page>1</page>
<presubmit>=php.GetNextNumber(/,uid)</presubmit>
</attribute>
<attribute id="gidNumber">
<display>GID Number</display>
<option>=php.PickList(/,(objectClass=posixGroup),gidNumber,%cn%)</option>
<order>3</order>
<page>1</page>
<value>=php.PickList(/,(objectClass=posixGroup),gidNumber,%cn%)</value>
</attribute>
<attribute id="sambaSID">
<display>Samba SID</display>
<option>=php.PickList(/,(objectClass=sambaDomain),sambaSID,%sambaSID% (%sambaDomainName%))</option>
<helper>
<id>sidsuffix</id>
<location>side</location>
<value></value>
</helper>
<post>=php.Join(-,(%sambaSID%,%sidsuffix%))</post>
<order>2</order>
<page>1</page>
<post>=php.Join(-,(%sambaSID%,%sidsuffix%))</post>
<value>=php.PickList(/,(objectClass=sambaDomain),sambaSID,%sambaSID% (%sambaDomainName%))</value>
</attribute>
<attribute id="sambaAcctFlags">
<hidden>1</hidden>
<value>[W]</value>
<hidden>1</hidden>
</attribute>
<attribute id="homeDirectory">
<hidden>1</hidden>
<value>/dev/null</value>
<hidden>1</hidden>
</attribute>
<attribute id="cn">
<hidden>1</hidden>
<value></value>
<hidden>1</hidden>
</attribute>
</attributes>
</template>

View File

@@ -27,7 +27,6 @@
<display>Last name</display>
<onchange>autoFill:cn,%givenName% %sn%</onchange>
<onchange>autoFill:uid,%gidNumber|0-0/T%-%givenName|0-1/l%%sn/l%</onchange>
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
<order>2</order>
<page>1</page>
</attribute>
@@ -47,91 +46,100 @@
<attribute id="uidNumber">
<display>UID Number</display>
<hint>Automatically determined</hint>
<value>=php.GetNextNumber(/,uid)</value>
<order>5</order>
<page>1</page>
<presubmit>=php.GetNextNumber(/,uid)</presubmit>
<readonly>1</readonly>
</attribute>
<attribute id="sambaSID">
<display>Samba SID</display>
<option>=php.PickList(/,(objectClass=sambaDomain),sambaSID,%sambaSID% (%sambaDomainName%))</option>
<helper>
<id>sidsuffix</id>
<location>side</location>
<value></value>
<option>=php.GetNextNumber(/,uid,false,,*2;+1000)</option>
</helper>
<post>=php.Join(-,(%sambaSID%,%sidsuffix%))</post>
<order>6</order>
<page>1</page>
<post>=php.Join(-,(%sambaSID%,%sidsuffix%))</post>
<spacer>1</spacer>
<value>=php.PickList(/,(objectClass=sambaDomain),sambaSID,%sambaSID% (%sambaDomainName%))</value>
</attribute>
<attribute id="userPassword">
<display>Password</display>
<helper>
<default>md5</default>
<display>Encryption</display>
<id>enc</id>
<location>side</location>
<value>blowfish</value>
<value>clear</value>
<value>crypt</value>
<value>ext_des</value>
<value>md5</value>
<value>md5crypt</value>
<value>sha</value>
<value>smd5</value>
<value>ssha</value>
</helper>
<icon>images/lock.png</icon>
<onchange>autoFill:sambaLMPassword,%userPassword%</onchange>
<onchange>autoFill:sambaNTPassword,%userPassword%</onchange>
<order>7</order>
<page>1</page>
<post>=php.Password(%enc%,%userPassword%)</post>
<type>password</type>
<verify>1</verify>
<helper>
<display>Encryption</display>
<id>enc</id>
<option>blowfish</option>
<option>clear</option>
<option>crypt</option>
<option>ext_des</option>
<option>md5</option>
<option>md5crypt</option>
<option>sha</option>
<option>smd5</option>
<option>ssha</option>
<value>md5</value>
</helper>
<post>=php.Password(%enc%,%userPassword%)</post>
<order>7</order>
<page>1</page>
</attribute>
<attribute id="sambaLMPassword">
<display>LM Password</display>
<type>password</type>
<post>=php.SambaPassword(LM,%sambaLMPassword%)</post>
<order>8</order>
<page>1</page>
</attribute>
<attribute id="sambaNTPassword">
<display>NT Password</display>
<order>8</order>
<page>1</page>
<post>=php.SambaPassword(NT,%sambaNTPassword%)</post>
<spacer>1</spacer>
<type>password</type>
<post>=php.SambaPassword(NT,%sambaNTPassword%)</post>
<order>9</order>
<page>1</page>
<spacer>1</spacer>
</attribute>
<attribute id="loginShell">
<display>Login shell</display>
<icon>images/terminal.png</icon>
<order>9</order>
<!-- <option>=php.PickList(/,(objectClass=posixAccount),loginShell,%loginShell%)</option> -->
<option>/bin/sh</option>
<option>/bin/tsh</option>
<option>/bin/csh</option>
<order>10</order>
<page>1</page>
<value>=php.PickList(/,(objectClass=posixAccount),loginShell,%loginShell%)</value>
</attribute>
<attribute id="gidNumber">
<display>GID Number</display>
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
<order>10</order>
<option>=php.PickList(/,(objectClass=posixGroup),gidNumber,%cn%)</option>
<order>11</order>
<page>1</page>
<value>=php.PickList(/,(objectClass=posixGroup),gidNumber,%cn%)</value>
</attribute>
<attribute id="sambaPrimaryGroupSID">
<display>Primary Group ID</display>
<option>=php.PickList(/,(objectClass=sambaGroupMapping),sambaSID,%sambaSID% (%cn%),sambaPrimaryGroupSID)</option>
<helper>
<id>sidpgsuffix</id>
<location>side</location>
<value></value>
</helper>
<order>11</order>
<page>1</page>
<post>=php.Join(-,(%sambaPrimaryGroupSID%,%sidpgsuffix%))</post>
<order>13</order>
<page>1</page>
<spacer>1</spacer>
<value>=php.PickList(/,(objectClass=sambaGroupMapping),sambaSID,%sambaSID% (%cn%),sambaPrimaryGroupSID)</value>
</attribute>
<attribute id="homeDirectory">
<display>Home directory</display>
<order>12</order>
<order>14</order>
<page>1</page>
</attribute>
<attribute id="sambaAcctFlags">
<hidden>1</hidden>
<value>[U]</value>
<hidden>1</hidden>
</attribute>
</attributes>
</template>

View File

@@ -34,12 +34,12 @@
</attribute>
<attribute id="sendmailMTAAliasValue">
<display>Recipient Addresses</display>
<type>textarea</type>
<order>4</order>
<page>1</page>
<type>textarea</type>
</attribute>
<attribute id="sendmailMTAAliasGrouping">
<default>aliases</default>
<value>aliases</value>
<hidden>1</hidden>
</attribute>
</attributes>

View File

@@ -32,7 +32,7 @@
<page>1</page>
</attribute>
<attribute id="sendmailMTAClassName">
<default>w</default>
<value>w</value>
<hidden>1</hidden>
</attribute>
</attributes>

View File

@@ -29,18 +29,18 @@
</attribute>
<attribute id="sendmailMTAKey">
<display>Host/Network/Address</display>
<option>RELAY: Allow host/network/address to relay</option>
<option>OK: Accept local mail but disallow relay</option>
<option>REJECT: Reject messages</option>
<option>DISCARD: Discard messages</option>
<option>SKIP: Apply default action to messages</option>
<option>ERROR: Reject message with custom error</option>
<order>3</order>
<page>1</page>
<value>RELAY: Allow host/network/address to relay</value>
<value>OK: Accept local mail but disallow relay</value>
<value>REJECT: Reject messages</value>
<value>DISCARD: Discard messages</value>
<value>SKIP: Apply default action to messages</value>
<value>ERROR: Reject message with custom error</value>
</attribute>
<attribute id="sendmailMTAMapName">
<hidden>1</hidden>
<value>access</value>
<hidden>1</hidden>
</attribute>
</attributes>
</template>

View File

@@ -32,8 +32,8 @@
<page>1</page>
</attribute>
<attribute id="sendmailMTAClassName">
<hidden>1</hidden>
<value>VirtHost</value>
<hidden>1</hidden>
</attribute>
</attributes>
</template>

View File

@@ -36,13 +36,13 @@
<attribute id="sendmailMTAMapValue">
<display>Recipient Addresses</display>
<hint>use %1 to map user name port of address</hint>
<type>textarea</type>
<order>4</order>
<page>1</page>
<type>textarea</type>
</attribute>
<attribute id="sendmailMTAMapName">
<hidden>1</hidden>
<value>virtuser</value>
<hidden>1</hidden>
</attribute>
</attributes>
</template>

View File

@@ -24,27 +24,26 @@
</attribute>
<attribute id="userPassword">
<display>Password</display>
<helper>
<default>md5</default>
<display>Encryption</display>
<id>enc</id>
<location>side</location>
<value>blowfish</value>
<value>clear</value>
<value>crypt</value>
<value>ext_des</value>
<value>md5</value>
<value>md5crypt</value>
<value>sha</value>
<value>smd5</value>
<value>ssha</value>
</helper>
<icon>images/lock.png</icon>
<order>5</order>
<page>1</page>
<post>=php.Password(%enc%,%userPassword%)</post>
<type>password</type>
<verify>1</verify>
<helper>
<display>Encryption</display>
<id>enc</id>
<option>blowfish</option>
<option>clear</option>
<option>crypt</option>
<option>ext_des</option>
<option>md5</option>
<option>md5crypt</option>
<option>sha</option>
<option>smd5</option>
<option>ssha</option>
<value>md5</value>
</helper>
<post>=php.Password(%enc%,%userPassword%)</post>
<order>5</order>
<page>1</page>
</attribute>
</attributes>
</template>

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE template SYSTEM "template.dtd">
<template>
<title>Address Book Entry</title>
<regexp>^uid=.*,</regexp>
<icon>images/user.png</icon>
<visible>1</visible>
<rdn>uid</rdn>
<objectClasses>
<objectClass id="inetOrgPerson"></objectClass>
<objectClass id="top"></objectClass>
</objectClasses>
<attributes>
<attribute id="givenName">
<display>First name</display>
<icon>images/uid.png</icon>
<onchange>autoFill:cn,%givenName% %sn%</onchange>
<order>1</order>
</attribute>
<attribute id="sn">
<display>Last name</display>
<onchange>autoFill:cn,%givenName% %sn%</onchange>
<order>2</order>
</attribute>
<attribute id="cn">
<display>Common Name</display>
<readonly>1</readonly>
<order>3</order>
<spacer>1</spacer>
</attribute>
<attribute id="o">
<display>Organisation</display>
<order>4</order>
</attribute>
<attribute id="street">
<display>Street</display>
<icon>images/mail.png</icon>
<type>textarea</type>
<cols>50</cols>
<rows>4</rows>
<order>5</order>
</attribute>
<attribute id="l">
<display>City</display>
<option>Berlin</option>
<option>London</option>
<option>Paris</option>
<option>Washington</option>
<option>Other</option>
<order>6</order>
</attribute>
<attribute id="st">
<display>State</display>
<order>7</order>
</attribute>
<attribute id="postalCode">
<display>Postal code</display>
<maxlength>5</maxlength>
<order>8</order>
<spacer>1</spacer>
</attribute>
<attribute id="telephoneNumber">
<display>Work phone</display>
<icon>images/phone.png</icon>
<order>9</order>
</attribute>
<attribute id="facsimileTelephoneNumber">
<display>Fax</display>
<order>10</order>
</attribute>
<attribute id="mobile">
<display>Mobile</display>
<order>11</order>
</attribute>
<attribute id="mail">
<display>Email</display>
<order>12</order>
</attribute>
</attributes>
</template>

View File

@@ -14,7 +14,7 @@
<!-- Template Definition -->
<!ELEMENT template (title,regexp?,icon?,description?,askcontainer?,rdn?,
destinationcontainer?,action?,
destinationcontainer?,action?,leaf?,
visible?,invalid?,objectClasses,attributes)>
<!-- ObjectClasses Definition -->
@@ -24,13 +24,13 @@
<!-- Attributes Definition -->
<!ELEMENT attributes (attribute*)>
<!ELEMENT attribute (array?, default?, cols?, description?, display?, helper?, hidden?, hint?,
icon?, onchange*, order?, override?, page?, post?,
presubmit?, rows?, spacer*, type?, value*, verify?)>
<!ELEMENT attribute (array?, value*, cols?, description?, display?, helper?, hidden?, readonly?, hint?,
icon?, onchange*, order?, override?, page?, post?,minvalnb?,maxvalnb?,
presubmit?, rows?, spacer*, type?, option*, verify?)>
<!ATTLIST attribute id CDATA #REQUIRED>
<!-- helper -->
<!ELEMENT helper (default?,display?,hint?,id?,location?,value*)>
<!ELEMENT helper (value*,display?,hint?,id?,location?,option*)>
<!-- ================================================================ -->
@@ -49,12 +49,16 @@
<!ELEMENT invalid (#PCDATA)>
<!ELEMENT destinationcontainer (#PCDATA)>
<!ELEMENT action (#PCDATA)>
<!ELEMENT leaf (#PCDATA)>
<!-- Attribute Parameters -->
<!ELEMENT array (#PCDATA)>
<!ELEMENT minvalnb (#PCDATA)>
<!ELEMENT maxvalnb (#PCDATA)>
<!ELEMENT cols (#PCDATA)>
<!ELEMENT default (#PCDATA)>
<!ELEMENT value (#PCDATA)>
<!ELEMENT hidden (#PCDATA)>
<!ELEMENT readonly (#PCDATA)>
<!ELEMENT onchange (#PCDATA)>
<!ELEMENT order (#PCDATA)>
<!ELEMENT override (#PCDATA)>
@@ -69,4 +73,4 @@
<!-- Helper Parameters -->
<!ELEMENT id (#PCDATA)>
<!ELEMENT location (#PCDATA)>
<!ELEMENT value (#PCDATA)>
<!ELEMENT option (#PCDATA)>

View File

@@ -1,173 +0,0 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/template_header.php,v 1.10 2006/10/28 11:42:10 wurley Exp $
/**
* Header page for engine.
* @package phpLDAPadmin
* @author The phpLDAPadmin development team
*/
include './header.php';
$url_base = sprintf('server_id=%s&amp;dn=%s',$ldapserver->server_id,$encoded_dn);
$export_href_base = sprintf('export_form.php?%s&amp;scope=%s',$url_base,'base');
$export_href_sub = sprintf('export_form.php?%s&amp;scope=%s',$url_base,'sub');
$refresh_href = sprintf('template_engine.php?%s&amp;random=%s',$url_base,random_junk());
$copy_href = sprintf('copy_form.php?%s',$url_base);
$intattr_href = sprintf('template_engine.php?%s&amp;show_internal_attrs=true',$url_base);
$delete_href = sprintf('delete_form.php?%s',$url_base);
$rename_href = sprintf('rename_form.php?%s',$url_base);
$compare_href = sprintf('compare_form.php?%s',$url_base);
$create_href = sprintf('create_form.php?server_id=%s&amp;container=%s',$ldapserver->server_id,$encoded_dn);
$addattr_href = sprintf('add_attr_form.php?%s',$url_base);
echo '<body>';
if ($dn) {
$actionlayout = '<td class="icon"><img src="images/%s" alt="%s" /></td><td><a href="%s" title="%s">%s</a></td>';
$hintlayout = '<td class="icon"><img src="images/light.png" alt="Hint" /></td><td colspan="3"><span class="hint">%s</span></td>';
printf('<h3 class="title">%s</h3>',htmlspecialchars($rdn));
printf('<h3 class="subtitle">%s: <b>%s</b> &nbsp;&nbsp;&nbsp; %s: <b>%s</b></h3>',
_('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars($dn));
echo "\n";
echo '<table class="edit_dn_menu"><tr>';
printf($actionlayout,'refresh.png','Refresh',$refresh_href,_('Refresh this entry'),_('Refresh'));
printf($actionlayout,'save.png','Save',$export_href_base,_('Save a dump of this object'),_('Export'));
echo '</tr><tr>';
printf($actionlayout,'cut.png','Cut',$copy_href,_('Copy this object to another location, a new DN, or another server'),_('Copy or move this entry'));
if ($show_internal_attrs)
printf($actionlayout,'tools-no.png','Hide',$refresh_href,'',_('Hide internal attributes'));
else
printf($actionlayout,'tools.png','Show',$intattr_href,'',_('Show internal attributes'));
echo '</tr>';
if (! $ldapserver->isReadOnly()) {
echo '<tr>';
printf($actionlayout,'trash.png','Trash',$delete_href,_('You will be prompted to confirm this decision'),_('Delete this entry'));
printf($actionlayout,'rename.png','Rename',$rename_href,'',_('Rename'));
echo '</tr>';
if ($config->GetValue('appearance','show_hints')) {
echo '<tr>';
printf($hintlayout,_('Hint: To delete an attribute, empty the text field and click save.'));
echo '</tr>';
}
echo '<tr>';
printf($actionlayout,'compare.png','Compare',$compare_href,'',_('Compare with another entry'));
echo '</tr>';
echo '<tr>';
printf($actionlayout,'star.png','Create',$create_href,'',_('Create a child entry'));
printf($actionlayout,'add.png','Add',$addattr_href,'',_('Add new attribute'));
echo '</tr>';
}
flush();
$children = $ldapserver->getContainerContents($dn,$max_children,'(objectClass=*)',$config->GetValue('deref','view'));
if (($children_count = count($children)) > 0) {
if ($children_count == $max_children)
$children_count = $children_count.'+';
$child_href = sprintf('search.php?server_id=%s&amp;search=true&amp;filter=%s&amp;base_dn=%s&amp;form=advanced&amp;scope=one',
$ldapserver->server_id,rawurlencode('objectClass=*'),$encoded_dn);
echo '<tr>';
printf($actionlayout,'children.png','Children',$child_href,'',($children_count == 1) ? _('View 1 child') : sprintf(_('View %s children'),$children_count));
printf($actionlayout,'save.png','Save',$export_href_sub,_('Save a dump of this object and all of its children'),_('Export subtree'));
echo '</tr>';
}
if ($config->GetValue('appearance','show_hints')) {
echo '<tr>';
printf($hintlayout,_('Hint: To view the schema for an attribute, click the attribute name.'));
echo '</tr>';
}
if ($ldapserver->isReadOnly()) {
echo '<tr>';
printf($hintlayout,_('Viewing entry in read-only mode.'));
echo '</tr>';
}
if ($modified_attrs) {
echo '<tr>';
printf($hintlayout,
($children_count == 1) ? sprintf(_('An attribute (%s) was modified and is highlighted below.'),implode('',$modified_attrs)) :
sprintf(_('Some attributes (%s) were modified and are highlighted below.'),implode(', ',$modified_attrs)));
echo '</tr>';
}
echo '</table>';
flush();
if (! $ldapserver->isReadOnly()) {
echo '<form action="update_confirm.php" method="post" name="edit_form">';
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
}
echo '<br />'."\n\n";
echo '<table class="edit_dn">';
if ($show_internal_attrs) {
$counter = 0;
foreach ($ldapserver->getDNSysAttrs($dn) as $attr => $vals) {
$counter++;
$schema_href = sprintf('schema.php?server_id=%s&amp;view=attributes&amp;viewvalue=%s',
$ldapserver->server_id,real_attr_name($attr));
printf('<tr><td colspan="2" class="attr"><b><a title="'._('Click to view the schema definition for attribute type \'%s\'').'" href="%s" />%s</b></td></tr>',
$attr,$schema_href,htmlspecialchars($attr));
echo '<tr><td class="val"><small>';
if ($ldapserver->isAttrBinary($attr)) {
$href = sprintf('download_binary_attr.php?server_id=%s&amp;dn=%s&amp;attr=%s',$server_id,$encoded_dn,$attr);
echo _('Binary value');
echo '<br />';
if (count($vals) > 1) {
for ($i=1;$i<=count($vals);$i++)
printf('<a href="%s&amp;value_num=%s"><img src="images/save.png" /> %s(%s)</a><br />',
$href,$i,_('download value'),$i);
} else {
printf('<a href="%s"><img src="images/save.png" /> %s</a><br />',
$href,_('download value'));
}
} else {
foreach ($vals as $v)
printf('%s<br />',htmlspecialchars($v));
}
echo '</small></td></tr>';
}
if ($counter == 0)
printf('<tr><td colspan="2">(%s)</td></tr>',_('No internal attributes'));
echo "\n\n";
}
flush();
} else {
printf('<h3 class="title">%s</h3>',_('Create Object'));
printf('<h3 class="subtitle">%s: <b>%s</b> &nbsp;&nbsp;&nbsp; %s: <b>%s</b></h3>',
_('Server'),$ldapserver->name,_('using template'),htmlspecialchars($_REQUEST['template']));
}
?>