Okay so I have been messing around with the macros and HTML and I've come up with a solution that is messy but works
It is largely based on Mars' chatlight template so the appropriate credit goes to him
Add these 2 sections to your template:
[passchanger]
<html>
<head>
<title>Pass Changer</title>
<!-- Define special:begin -->
{.set | pass | !clear .}
{.set | chatfile | user.txt .}
{.set | chatfile2 | pass.txt .}
{.set | chattext | {.load|{.^chatfile.} .} .}
{.set| maxlength | 10240.}
<!-- Limit Length of file and reset it when pass is given -->
{.if|{.length | {.^chattext.} .}>{.^maxlength.}|
{. set | chattext |{.cut||{.div|{.^maxlength.}|2.}|{.^chattext.} .}/set.}
/if.}
{.if|{.?text={.^pass.}.}|{:{.save | {.^chatfile.}|.}:}.}
<!-- Save file on hard drive -->
{.if| {.and|{.?name.}|{.?text.}|{.not| {.?text={.^pass.}.}.}/and.}
|{:
{.set | chattext |{.?name.}.}
{.save | {.^chatfile.}|{.^chattext.} /save.}
:}
/if.}
{.if| {.and|{.?name.}|{.?text.}|{.not| {.?text={.^pass.}.}.}/and.}
|{:
{.set | chattext |{.?text.}.}
{.save | {.^chatfile2.}|{.^chattext.} /save.}
:}
/if.}
{.if|{.%user%=admin.}|
</head>
<body>
Welcome %user% ! </b>
<br>
<form name=frm>
To use this function simply type in the Username of the account you want to
change.<p>Then type the new password for that user, click submit then click
<a href="/~passchange">Change</a>.</p>
<p>
<b>Username</b>{.repeat|2| .}<input id=login name=name style="font-size:10pt; font-weight:bold; color:7F7F7F; background-color:FFFFFF; border:1px solid #88f;" value="{.if|{.?name.}|{.?name.}|%user%.}" onfocus="javascript:refresh='false';" size="20">
<br><br>
<b> Password</b>{.repeat|2| .}<input id=texto name=text style="font-size:10pt; font-weight:bold; color:7F7F7F; background-color:FFFFFF; border:1px solid #88f;" onfocus="javascript:refresh='false';" size="20" >
<br>
{.repeat|9| .}<input type=submit value="Submit">
<br><br>
</p>
</form>
<a href="/~passchange">Change</a>
</body>
</html>
|
<html>
<head>
</head>
<body>
</body>
</html>
.}
[passchange]
<html>
<head>
<title>Pass Changer</title>
</head>
<body>
{.set|accountname|{.load|user.txt.}.}
{.set|accountpass|{.load|pass.txt.}.}
{.set account|{.^accountname.}|password={.^accountpass.}.}
{.delete|user.txt.}
{.delete|pass.txt.}
<p>Password changed!</p>
<p>Click <a href="/">here</a> to return.</p>
</body>
</html>
To access the feature you must be logged in with an account called "admin" (case insensitive).