version 1.16, 2001/11/15 19:08:00
|
version 1.17, 2001/11/15 22:38:12
|
Line 199 if (system('/usr/sbin/useradd','-c','LON
|
Line 199 if (system('/usr/sbin/useradd','-c','LON
|
} |
} |
|
|
# Make www a member of that user group. |
# Make www a member of that user group. |
if (system('/usr/sbin/usermod','-G',$safeusername,'www')) { |
my $groups=`/usr/bin/groups www` or exit(6); |
|
chomp $groups; $groups=~s/^\S+\s+\:\s+//; |
|
my @grouplist=split(/\s+/,$groups); |
|
my @ugrouplist=grep {!/www|$safeusername/} @grouplist; |
|
my $gl=join(',',(@ugrouplist,$safeusername)); |
|
if (system('/usr/sbin/usermod','-G',$gl,'www')) { |
print "Error. Could not make www a member of the group ". |
print "Error. Could not make www a member of the group ". |
"\"$safeusername\".\n" unless $noprint; |
"\"$safeusername\".\n" unless $noprint; |
unlink('/tmp/lock_lcpasswd'); |
unlink('/tmp/lock_lcpasswd'); |
Line 231 if ($?) {
|
Line 236 if ($?) {
|
|
|
# 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",2760; |
mkdir "/home/$safeusername/public_html",0755; |
|
system('/bin/chmod','2770',"/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> |
Line 250 This area provides for:
|
Line 256 This area provides for:
|
<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"); |