Git Codebase - Sn0wlink IT
FredMin/modules
[...] Up Directory
add-sys-user.php
authlog.php
backup.php
cmd-line.php
cron-editor.php
debuglog.php
edit-hostname.php
edit-ip.php
file-explorer.php
foot.php
head.php
kernallog.php
logs.php
offsite-backup.php
passwd-change.php
phpinfo.php
remove-user.php
restart-apache.php
restart-mysql.php
restart-server.php
restart-ssh.php
smart.php
software.php
update.php
passwd-change.php
<?php // Page name $pagename ="Password Changer"; // Include Files include ('./config/config.php'); include ('head.php'); include ('../functions.php'); echo "<p class='menu-header'>Reset User Password</p><br /> Change existing user password <br /><br />"; echo "<form method='post' action='passwd-change.php'> <table> <tr> <td> Username: </td> <td> <input name='username' size='40' value=''> </td> </tr> <tr> <td> Password: </td> <td> <input name='password' size='40' value=''> </td> </tr> <tr> <td> <input type='submit' id='submit' value='submit' /> </td> </tr> </table> </form> "; $userset = $_POST["username"]; $passwd = $_POST["password"]; if ($_POST != ""){ shell_exec("echo -e '$passwd\n$passwd\n' | sudo passwd $userset\n"); // echo "<pre>$cmdline</pre>"; // echo "<p>changed $userset's password - Success. $passwd</p>"; } // Footer include ('foot.php'); ?>