Diff for /loncom/Attic/lcuseradd between versions 1.20 and 1.22

version 1.20, 2002/04/27 13:10:47 version 1.22, 2002/09/16 13:27:40
Line 162  else { Line 162  else {
 }  }
   
 my ($username,$password1,$password2)=@input;  my ($username,$password1,$password2)=@input;
   print "Username = ".$username unless $noprint;
 $username=~/^(\w+)$/;  $username=~/^(\w+)$/;
   print "Username after substitution - ".$username unless $noprint;
 my $safeusername=$1;  my $safeusername=$1;
   print "Safe username = $safeusername" unless $noprint;
   
 if (($username ne $safeusername) or ($safeusername!~/^[A-Za-z]/)) {  if (($username ne $safeusername) or ($safeusername!~/^[A-Za-z]/)) {
     print "Error. The user name specified has invalid characters.\n"      print "Error. The user name specified $username $safeusername  has invalid characters.\n"
  unless $noprint;   unless $noprint;
     unlink('/tmp/lock_lcpasswd');      unlink('/tmp/lock_lcpasswd');
     exit 9;      exit 9;
Line 244  if ($?) { Line 248  if ($?) {
 # ------------------------------ Make final modifications to the user directory  # ------------------------------ Make final modifications to the user directory
 # -- Add a public_html file with a stand-in index.html file  # -- Add a public_html file with a stand-in index.html file
   
 # system('/bin/chmod','-R','0660',"/home/$safeusername");   system('/bin/chmod','-R','0660',"/home/$safeusername");
 #system('/bin/chmod','0710',"/home/$safeusername");  system('/bin/chmod','0710',"/home/$safeusername");
 #mkdir "/home/$safeusername/public_html",0755;  mkdir "/home/$safeusername/public_html",0755;
 #system('/bin/chmod','02770',"/home/$safeusername/public_html");  system('/bin/chmod','02770',"/home/$safeusername/public_html");
 #open OUT,">/home/$safeusername/public_html/index.html";  open OUT,">/home/$safeusername/public_html/index.html";
 #print OUT<<END;  print OUT<<END;
 #<html>  <html>
 #<head>  <head>
 #<title>$safeusername</title>  <title>$safeusername</title>
 #</head>  </head>
 #<body>  <body>
 #<h1>$safeusername</h1>  <h1>$safeusername</h1>
 #<p>  <p>
 #Learning Online Network  Learning Online Network
 #</p>  </p>
 #<p>  <p>
 #This area provides for:  This area provides for:
 #</p>  </p>
 #<ul>  <ul>
 #<li>resource construction</li>  <li>resource construction</li>
 #<li>resource publication</li>  <li>resource publication</li>
 #<li>record-keeping</li>  <li>record-keeping</li>
 #</ul>  </ul>
 #</body>  </body>
 #</html>  </html>
 #END  END
 #close OUT;  close OUT;
   
 system('/bin/chown','-R',"$safeusername:$safeusername","/home/$safeusername");  system('/bin/chown','-R',"$safeusername:$safeusername","/home/$safeusername");
   

Removed from v.1.20  
changed lines
  Added in v.1.22


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>