version 1.15, 2008/03/03 15:25:02
|
version 1.17, 2009/07/17 22:23:59
|
Line 304 foreach (split(//,$passwd)) {if ((ord($_
|
Line 304 foreach (split(//,$passwd)) {if ((ord($_
|
if ($pbad) { |
if ($pbad) { |
die('Password must consist of standard ASCII characters'."\n"); |
die('Password must consist of standard ASCII characters'."\n"); |
} |
} |
open(OUT,"|passwd --stdin $username"); |
|
print(OUT $passwd."\n"); |
my $distro; |
close(OUT); |
if (open(PIPE,"perl distprobe|")) { |
|
$distro = <PIPE>; |
|
close(PIPE); |
|
} |
|
if ($distro =~ /^ubuntu|debian/) { |
|
open(OUT,"|usermod -p `mkpasswd $passwd` $username"); |
|
close(OUT); |
|
} else { |
|
open(OUT,"|passwd --stdin $username"); |
|
print(OUT $passwd."\n"); |
|
close(OUT); |
|
} |
|
|
=pod |
=pod |
|
|
Line 426 print("\n$username is now a domain coord
|
Line 437 print("\n$username is now a domain coord
|
my $hostname=`hostname`; chomp($hostname); # Read in hostname. |
my $hostname=`hostname`; chomp($hostname); # Read in hostname. |
print("\n".'Once LON-CAPA is running, you should log-in and use: '."\n". |
print("\n".'Once LON-CAPA is running, you should log-in and use: '."\n". |
'http://'.$hostname.'/adm/createuser to further define this user.'."\n\n". |
'http://'.$hostname.'/adm/createuser to further define this user.'."\n\n". |
'From the user management menu, click the link: "Add/Modify a Single User" '."\n". |
'From the user management menu, click the link: "Add/Modify a User" '."\n". |
'to search for the user and to provide additional information (last name, first name etc.).'."\n"); |
'to search for the user and to provide additional information (last name, first name etc.).'."\n"); |
# Output a suggested URL. |
# Output a suggested URL. |
|
|