104 lines
3.9 KiB
HTML
104 lines
3.9 KiB
HTML
|?TREE=» <a class=tree href="CMD_LOGIN_KEYS">Login Keys</a> » <a class=tree href="CMD_LOGIN_KEYS?action=show_create">Create new Login Key</a>|
|
|
|HTM_USER_TOP|
|
|
|
|
<script language="Javascript">
|
|
<!--
|
|
|
|
|?HASH_LEN=64|
|
|
|
|
|HTM_JAVASCRIPT|
|
|
|
|
function create_key()
|
|
{
|
|
num_pass_tries++;
|
|
|
|
if (num_pass_tries >= 20)
|
|
{
|
|
alert("Unable to generate a key with a number, upper and lower case characters in it. Tried 20 times");
|
|
return "error1";
|
|
}
|
|
|
|
var length = |HASH_LEN|;
|
|
var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
|
|
|
var pass = "";
|
|
var i=0;
|
|
|
|
for (i=0; i<length; i++)
|
|
{
|
|
pass = pass + random_char(chars);
|
|
}
|
|
|
|
//this basically just says "ok, we need a number" so it recursivly tries again.
|
|
if (!has_number(pass) || !has_lower_case(pass) || !has_upper_case(pass))
|
|
{
|
|
return random_pass();
|
|
}
|
|
|
|
return pass;
|
|
}
|
|
|
|
function create_random_key()
|
|
{
|
|
with (document.tableform)
|
|
{
|
|
key.value = create_key();
|
|
key2.value = key.value;
|
|
}
|
|
|
|
num_pass_tries = 0;
|
|
}
|
|
|
|
// -->
|
|
</script>
|
|
|
|
|
|
<table class='list' cellpadding=3 cellspacing=1>
|
|
<form name=tableform action="CMD_LOGIN_KEYS" method="post">
|
|
<input type=hidden name="action" value="create">
|
|
|
|
<tr><td class=listtitle colspan=3><b>Create new Login Key</b></td></tr>
|
|
|
|
<tr><td class=list>Key Name:</td><td class=list colspan=2><input type=text name=keyname size=16 maxlength=32> A label to manage the keys. This is not the login username. (a-zA-Z0-9)</td></tr>
|
|
<tr><td class=list2>Key Value:</td><td class=list2 colspan=2><input type=password name=key size=|HASH_LEN| maxlength=|HASH_LEN|> <input type=button value="Random" onClick="create_random_key()"></td></tr>
|
|
<tr><td class=list>Re-Enter Key:</td><td class=list colspan=2><input type=password name=key2 size=|HASH_LEN| maxlength=|HASH_LEN|></td></tr>
|
|
<tr><td class=list2>Expires on:</td><td class=list2 colspan=2>
|
|
<input type=checkbox name=never_expires value="yes"> Never
|
|
|HOUR|:|MINUTE|, |MONTH||DAY||YEAR|
|
|
</td></tr>
|
|
<tr><td class=list>Uses:</td><td class=list colspan=2><input type=text size=3 name="max_uses" value="1"> Number of commands that can be used with this key. 0=Unlimited</td></tr>
|
|
<tr><td class=list2>Clear Key:</td>
|
|
<td class=list2 colspan=2><input type=checkbox name="clear_key" value="yes"> Automatically delete the key once the key expires, or all uses are used.</td>
|
|
</tr>
|
|
<tr><td class=list>Allow HTM:</td><td class=list colspan=2><input type=checkbox name="allow_htm" value="yes"> Allows browsing of the DA interface to HTM, IMG and CSS files.</td></tr>
|
|
|
|
<tr><td class=list2 valign=top>Commands:</td>
|
|
<td class=list2 colspan=2>
|
|
<div style="overflow: auto; height: 350px; width: 640px;">
|
|
<table cellpadding=0 cellspacing=0 width=100%>
|
|
<tr>
|
|
<td>|ALLOW_COMMANDS|</td>
|
|
<td>|DENY_COMMANDS|</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr><td class=list valign=top>Allowed IPs:</td>
|
|
<td class=list valign=top width=220>
|
|
<textarea name=ips cols=30 rows=3></textarea>
|
|
</td>
|
|
<td class=list valign=top>One IP per line.<br>Ranges allowed: 1.2.3.4-5<br>Leave blank to allow any IP.</td>
|
|
</tr>
|
|
<tr><td class=list2>Current Password:</td><td class=list2 colspan=2><input type=password name=passwd size=16></td></tr>
|
|
<tr><td class=listtitle colspan=3 align=right>
|
|
<input type=submit name=create value="Create">
|
|
</td></tr>
|
|
</form>
|
|
</table>
|
|
|
|
If no commands are checked (allow and deny), all commands are allowed.<br>The priorities for allow and deny are <a target=_blank href="http://www.directadmin.com/features.php?id=1171">listed here</a>.<br>The ALL_USER type commands are replaced with all commands the User is allowed, at that level.
|
|
<br><br>
|
|
<b>Please Note</b> that if a key is allowed to access ALL_USER, CMD_LOGIN_KEYS, or CMD_API_LOGIN_KEYS,<br>that key will have sufficient privileges to create another key of higher privilege.<br>Please keep this is mind when chosing a key's privileges.
|
|
|
|
|HTM_USER_BOTTOM| |