mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
The default for PermitRootLogin is prohibit-password https://forum.virtualmin.com/t/transferring-sites-using-ssh/120192/7
This commit is contained in:
@@ -56,22 +56,19 @@ else {
|
||||
|
||||
# Allow logins by root
|
||||
$root = &find_value("PermitRootLogin", $conf);
|
||||
if (!$root) {
|
||||
# Default ways seems to be 'yes'
|
||||
$root = "yes";
|
||||
}
|
||||
@opts = ( [ 'yes', $text{'yes'} ],
|
||||
@opts = ( [ '', $text{'default'}.' ('.$text{'users_nopwd'}.')' ],
|
||||
[ 'yes', $text{'yes'} ],
|
||||
[ 'no', $text{'no'} ] );
|
||||
if ($version{'type'} eq 'ssh') {
|
||||
push(@opts, [ 'nopwd', $text{'users_nopwd'} ]);
|
||||
}
|
||||
else {
|
||||
push(@opts, [ 'without-password', $text{'users_nopwd'} ]);
|
||||
push(@opts, [ 'prohibit-password', $text{'users_nopwd'} ]);
|
||||
if ($version{'number'} >= 2) {
|
||||
push(@opts, [ 'forced-commands-only', $text{'users_fcmd'} ]);
|
||||
}
|
||||
}
|
||||
print "</select></td>\n";
|
||||
$root = "prohibit-password" if ($root eq "without-password");
|
||||
print &ui_table_row($text{'users_root'},
|
||||
&ui_select("root", lc($root), \@opts));
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
|
||||
|
||||
&save_directive("PermitEmptyPasswords", $conf, $in{'pempty'} ? 'yes' : 'no');
|
||||
|
||||
&save_directive("PermitRootLogin", $conf, $in{'root'});
|
||||
&save_directive("PermitRootLogin", $conf, $in{'root'} || undef);
|
||||
|
||||
if (($version{'type'} eq 'ssh' && $version{'number'} < 3) ||
|
||||
($version{'type'} eq 'openssh' && $version{'number'} < 7.3)) {
|
||||
|
||||
Reference in New Issue
Block a user