\n";
if ($version{'type'} eq 'ssh' && $version{'number'} < 2) {
&scmd();
$expire = &find_value("AccountExpireWarningDays", $conf);
print "| $text{'users_expire'} | \n";
printf " %s\n",
$expire ? "" : "checked", $text{'users_expire_def'};
printf "\n",
$expire ? "checked" : "";
print " | \n";
&ecmd();
}
$mail = &find_value("CheckMail", $conf);
if ($version{'type'} eq 'ssh') {
&scmd();
print "$text{'users_mail'} | \n";
printf " %s\n",
lc($mail) eq 'no' ? "" : "checked", $text{'yes'};
printf " %s | \n",
lc($mail) eq 'no' ? "checked" : "", $text{'no'};
&ecmd();
}
elsif ($version{'number'} < 3.1) {
&scmd();
print "$text{'users_mail'} | \n";
printf " %s\n",
lc($mail) eq 'yes' ? "checked" : "", $text{'yes'};
printf " %s | \n",
lc($mail) eq 'yes' ? "" : "checked", $text{'no'};
&ecmd();
}
# XXX are these supported?
#$empty = &find_value("ForcedEmptyPasswdChange", $conf);
#print " | $text{'users_empty'} | \n";
#printf " %s\n",
# lc($empty) eq 'yes' ? "checked" : "", $text{'yes'};
#printf " %s | \n",
# lc($empty) eq 'yes' ? "" : "checked", $text{'no'};
#$passwd = &find_value("ForcedPasswdChange", $conf);
#print "$text{'users_passwd'} | \n";
#printf " %s\n",
# lc($passwd) eq 'no' ? "" : "checked", $text{'yes'};
#printf " %s | \n",
# lc($passwd) eq 'no' ? "checked" : "", $text{'no'};
if ($version{'type'} eq 'ssh' && $version{'number'} < 2) {
&scmd();
$pexpire = &find_value("PasswordExpireWarningDays", $conf);
print "$text{'users_pexpire'} | \n";
printf " %s\n",
$pexpire ? "" : "checked", $text{'users_pexpire_def'};
printf "\n",
$pexpire ? "checked" : "";
print " | \n";
&ecmd();
}
if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
&scmd();
$auth = &find_value("PasswordAuthentication", $conf);
print "$text{'users_auth'} | \n";
printf " %s\n",
lc($auth) eq 'no' ? "" : "checked", $text{'yes'};
printf " %s | \n",
lc($auth) eq 'no' ? "checked" : "", $text{'no'};
&ecmd();
}
&scmd();
$pempty = &find_value("PermitEmptyPasswords", $conf);
print "$text{'users_pempty'} | \n";
if ($version{'type'} eq 'ssh') {
printf " %s\n",
lc($pempty) eq 'no' ? "" : "checked", $text{'yes'};
printf " %s | \n",
lc($pempty) eq 'no' ? "checked" : "", $text{'no'};
}
else {
printf " %s\n",
lc($pempty) eq 'yes' ? "checked" : "", $text{'yes'};
printf " %s\n",
lc($pempty) eq 'yes' ? "" : "checked", $text{'no'};
}
&ecmd();
&scmd();
$root = &find_value("PermitRootLogin", $conf);
if (!$root) {
# Default ways seems to be 'yes'
$root = "yes";
}
print "$text{'users_root'} | | \n";
&ecmd();
if ($version{'type'} ne 'ssh' || $version{'number'} < 3) {
&scmd();
$rsa = &find_value("RSAAuthentication", $conf);
print "$text{'users_rsa'} | \n";
printf " %s\n",
lc($rsa) eq 'no' ? "" : "checked", $text{'yes'};
printf " %s | \n",
lc($rsa) eq 'no' ? "checked" : "", $text{'no'};
&ecmd();
}
&scmd();
$strict = &find_value("StrictModes", $conf);
print "$text{'users_strict'} | \n";
printf " %s\n",
lc($strict) eq 'no' ? "" : "checked", $text{'yes'};
printf " %s | \n",
lc($strict) eq 'no' ? "checked" : "", $text{'no'};
&ecmd();
&scmd();
$motd = &find_value("PrintMotd", $conf);
print "$text{'users_motd'} | \n";
printf " %s\n",
lc($motd) eq 'no' ? "" : "checked", $text{'yes'};
printf " %s | \n",
lc($motd) eq 'no' ? "checked" : "", $text{'no'};
&ecmd();
if ($version{'type'} eq 'openssh') {
&scmd();
$known = &find_value("IgnoreUserKnownHosts", $conf);
print "$text{'users_known'} | \n";
printf " %s\n",
lc($known) eq 'yes' ? "checked" : "", $text{'yes'};
printf " %s | \n",
lc($known) eq 'yes' ? "" : "checked", $text{'no'};
&ecmd();
if ($version{'number'} > 2.3) {
&scmd(1);
$banner = &find_value("Banner", $conf);
print "$text{'users_banner'} | \n";
printf " %s\n",
$banner ? "" : "checked", $text{'users_banner_def'};
printf "\n",
$banner ? "checked" : "";
print "\n",
&file_chooser_button("banner")," | \n";
&ecmd();
}
}
elsif ($version{'type'} eq 'ssh' && $version{'number'} >= 2) {
&scmd(1);
$banner = &find_value("BannerMessageFile", $conf);
print "$text{'users_banner'} | \n";
printf " %s\n",
$banner ? "" : "checked", $text{'users_banner_def'};
printf "\n",
$banner ? "checked" : "";
print "\n",
&file_chooser_button("banner")," | \n";
&ecmd();
}
if ($version{'type'} eq 'openssh' && $version{'number'} >= 3) {
&scmd(1);
$authkeys = &find_value("AuthorizedKeysFile", $conf);
print "$text{'users_authkeys'} | \n";
printf " %s\n",
$authkeys ? "" : "checked", $text{'users_authkeys_def'};
printf "\n",
$authkeys ? "checked" : "";
print " | \n";
&ecmd();
}
&scmd(1);
print "
| \n";
&ecmd();
if ($version{'type'} eq 'openssh' && $version{'number'} < 3.7 ||
$version{'type'} eq 'ssh' && $version{'number'} < 2) {
&scmd();
$rhostsauth = &find_value("RhostsAuthentication", $conf);
print "$text{'users_rhostsauth'} | \n";
printf " %s\n",
lc($rhostsauth) eq 'yes' ? "checked" : "", $text{'yes'};
printf " %s | \n",
lc($rhostsauth) eq 'yes' ? "" : "checked", $text{'no'};
&ecmd();
&scmd();
$rhostsrsa = &find_value("RhostsRSAAuthentication", $conf);
print "$text{'users_rhostsrsa'} | \n";
if ($version{'type'} eq 'ssh') {
printf " %s\n",
lc($rhostsrsa) eq 'no' ? "" : "checked", $text{'yes'};
printf " %s | \n",
lc($rhostsrsa) eq 'no' ? "checked" : "", $text{'no'};
}
else {
printf " %s\n",
lc($rhostsrsa) eq 'yes' ? "checked" : "", $text{'yes'};
printf " %s\n",
lc($rhostsrsa) eq 'yes' ? "" : "checked", $text{'no'};
}
&ecmd();
}
&scmd();
$rhosts = &find_value("IgnoreRhosts", $conf);
print "$text{'users_rhosts'} | \n";
if ($version{'type'} eq 'ssh') {
printf " %s\n",
lc($rhosts) eq 'yes' ? "checked" : "", $text{'yes'};
printf " %s | \n",
lc($rhosts) eq 'yes' ? "" : "checked", $text{'no'};
}
else {
printf " %s\n",
lc($rhosts) eq 'no' ? "" : "checked", $text{'yes'};
printf " %s\n",
lc($rhosts) eq 'no' ? "checked" : "", $text{'no'};
}
&ecmd();
if ($version{'type'} eq 'ssh') {
&scmd(1);
$rrhosts = &find_value("IgnoreRootRhosts", $conf);
print "$text{'users_rrhosts'} | \n";
printf " %s\n",
lc($rrhosts) eq 'yes' ? "checked" : "", $text{'yes'};
printf " %s\n",
lc($rrhosts) eq 'no' ? "checked" : "", $text{'no'};
printf " %s | \n",
$rrhosts ? "" : "checked", $text{'users_rrdef'};
&ecmd();
}
print " |