\n";
print " $text{'euser_name'} | \n";
print "$u->{'name'} | \n";
print "$text{'euser_uid'} | \n";
print "{'uid'}\"> | \n";
print " $text{'euser_passwd'} | \n";
if ($samba_version >= 3) {
# In the new Samba, the password field is not really used for locking
# accounts any more, so don't both with the no access/no password
# options.
print " ",
"$text{'euser_currpw'}\n";
}
else {
# In the old Samba, you can set the password to deny a login to the
# account or allow logins without a password
$locked = ($u->{'pass1'} eq ("X" x 32));
$nopass = ($u->{'pass1'} =~ /^NO PASSWORD/);
printf " | $text{'euser_noaccess'}\n",
$locked ? "checked" : "";
printf " $text{'euser_nopw'}\n",
$nopass ? "checked" : "";
printf " $text{'euser_currpw'}\n",
$locked||$nopass ? "" : "checked";
}
print " $text{'euser_newpw'}\n";
print " | \n";
if (!$u->{'opts'}) {
# Old-style samba user
print " $text{'euser_realname'} | \n";
print " | \n";
print " $text{'euser_homedir'} | \n";
print " | \n";
print "$text{'euser_shell'} | \n";
printf " | \n",
$u->{'shell'};
}
else {
# New-style samba user
print "\n";
map { $opt{uc($_)}++ } @{$u->{'opts'}};
print " $text{'euser_option'} | \n";
@ol = ($text{'euser_normal'}, "U", $text{'euser_nopwrequired'}, "N",
$text{'euser_disable'}, "D", $text{'euser_locked'}, "L" ,$text{'euser_noexpire'}, "X", $text{'euser_trust'}, "W");
for($i=0; $i<@ol; $i+=2) {
printf " %s \n",
$ol[$i+1], $opt{$ol[$i+1]} ? "checked" : "", $ol[$i];
delete($opt{$ol[$i+1]});
}
foreach $oo (keys %opt) {
print "\n";
}
print " | \n";
}
print " |