How to make a domain coordinator on
a newly installed LON-CAPA system
Scott Harrison
April 17, 2001
Example situation:
Adding a user "dc103" to be a domain coordinator
for the domain 103.
1. login as super-user
2. /usr/sbin/adduser dc103
3. passwd dc103
enter in a password
4. login as user=www
5. cd /home/httpd/lonUsers/103
6. install -d d/c/103/dc103
7. cd d/c/103/dc103
8. echo "unix:" > passwd
9. Run the following script with the arguments
[script] 103 dc103
#!/usr/bin/perl
# quick temporary script
# brought up-to-date by Scott Harrison, 03/01/2001
print "Usage: rolesmanip.pl DOMAIN USERNAME\n" unless @ARGV;
my $domain=shift @ARGV;
my $name=shift @ARGV;
my ($l1,$l2,$l3)=split(//,substr($name,0,3));
use GDBM_File;
my %hash;
tie(%hash,'GDBM_File',
"/home/httpd/lonUsers/$domain/$l1/$l2/$l3/$name/roles.db",
&GDBM_WRCREAT,0640);
$hash{'/'.$domain.'/_dc'}='dc';
open OUT, ">/home/httpd/lonUsers/$domain/$l1/$l2/$l3/$name/roles.hist";
map {
print OUT $_.' : '.$hash{$_}."\n";
} keys %hash;
close OUT;
untie %hash;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>