version 1.5, 2000/10/29 22:50:56
|
version 1.6, 2000/10/29 22:52:30
|
Line 88 $username=~/^(\w+)$/;
|
Line 88 $username=~/^(\w+)$/;
|
my $safeusername=$1; |
my $safeusername=$1; |
|
|
if ($password1 ne $password2) { |
if ($password1 ne $password2) { |
print "Error. Password mismatch.\n"; |
print "Error. Password mismatch.\n" unless $noprint; |
unlink('/tmp/lock_lcpasswd'); |
unlink('/tmp/lock_lcpasswd'); |
exit 7; |
exit 7; |
} |
} |
Line 99 if ($password1 ne $password2) {
|
Line 99 if ($password1 ne $password2) {
|
# a way that www is a member of the user-specific group |
# a way that www is a member of the user-specific group |
|
|
if (system('/usr/sbin/useradd','-c','LON-CAPA user',$safeusername)) { |
if (system('/usr/sbin/useradd','-c','LON-CAPA user',$safeusername)) { |
print "Error. Something went wrong with the addition of user \"$safeusername\".\n"; |
print "Error. Something went wrong with the addition of user \"$safeusername\".\n" unless $noprint; |
unlink('/tmp/lock_lcpasswd'); |
unlink('/tmp/lock_lcpasswd'); |
exit 5; |
exit 5; |
} |
} |
if (system('/usr/sbin/usermod','-G',$safeusername,'www')) { |
if (system('/usr/sbin/usermod','-G',$safeusername,'www')) { |
print "Error. Could not make www a member of the group \"$safeusername\".\n"; |
print "Error. Could not make www a member of the group \"$safeusername\".\n" unless $noprint; |
unlink('/tmp/lock_lcpasswd'); |
unlink('/tmp/lock_lcpasswd'); |
exit 6; |
exit 6; |
} |
} |