#!/usr/local/bin/perl # edit_passwd.cgi require './passwd-lib.pl'; &ReadParse(); &error_setup($text{'passwd_err'}); @user = getpwnam($in{'user'}); @user || &error($text{'passwd_euser'}); &can_edit_passwd(\@user) || &error($text{'passwd_ecannot'}); # Show password change form &ui_print_header(undef, $text{'passwd_title'}, ""); print "
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
$text{'passwd_header'}
\n"; %uconfig = &foreign_config("useradmin"); print "\n"; $user[6] =~ s/,.*$// if ($uconfig{'extra_real'}); print "\n"; if ($access{'old'} == 1 || $access{'old'} == 2 && $user[0] ne $remote_user) { print "\n"; print "\n"; } print "\n"; print "\n"; if ($access{'repeat'}) { print "\n"; print "\n"; } if (!$config{'passwd_cmd'} && $access{'expire'}) { &foreign_require("useradmin", "user-lib.pl"); $pft = &useradmin::passfiles_type(); ($uuser) = grep { $_->{'user'} eq $in{'user'} } &useradmin::list_users(); if ($uuser->{'max'} && ($pft == 2 || $pft == 5)) { print "\n"; } } if ($access{'others'} == 2) { print "\n"; } print "\n"; print "
$text{'passwd_for'}$user[0]",( $user[6] ? " ($user[6])" : "" ), "
$text{'passwd_old'}
$text{'passwd_new'}
$text{'passwd_repeat'}
\n"; print " ", "$text{'passwd_expire'}
\n"; print " ", "$text{'passwd_others'}
\n"; print "\n"; print "
\n"; &ui_print_footer($in{'one'} ? ( "/", $text{'index'} ) : ( "", $text{'index_return'} ));