=$var['NAME']?>
=$var['COMMENT']?>
Please set a password for the root user account. Maximum length is 128 characters.
_('root requires a password'), 'mismatch' => _('Password confirmation does not match'), 'maxLength' => _('Max password length is 128 characters'), 'saveError' => _('Unable to set password'), ]; $POST_ERROR = ''; /** * POST handler */ if (!empty($_POST['password']) && !empty($_POST['confirmPassword'])) { if ($_POST['password'] !== $_POST['confirmPassword']) return $POST_ERROR = $VALIDATION_MESSAGES['mismatch']; if (strlen($_POST['password']) > $MAX_PASS_LENGTH) return $POST_ERROR = $VALIDATION_MESSAGES['maxLength']; $userName = 'root'; $userPassword = base64_encode($_POST['password']); $result = exec("/usr/local/sbin/emcmd 'cmdUserEdit=Change&userName=$userName&userPassword=$userPassword'"); if ($result == 0) { // PAM service will log to syslog: "password changed for root" session_start(); $_SESSION['unraid_login'] = time(); $_SESSION['unraid_user'] = 'root'; session_regenerate_id(true); session_write_close(); header("Location: /".$var['START_PAGE']); exit; } // Error when attempting to set password exec("logger -t webGUI ".escapeshellarg($VALIDATION_MESSAGES['saveError'] . " [REMOTE_ADDR]: {$REMOTE_ADDR}")); return $POST_ERROR = $VALIDATION_MESSAGES['saveError']; } extract(parse_plugin_cfg('dynamix',true)); $THEME_DARK = in_array($display['theme'],['black','gray']); ?>
Please set a password for the root user account. Maximum length is 128 characters.