File:  [LON-CAPA] / doc / Attic / how_to_domain_coordinator.txt
Revision 1.6: download - view: text, annotated - select for diffs
Wed May 30 17:10:12 2001 UTC (22 years, 10 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
correctly enumerating steps

How to make a domain coordinator on
a newly installed LON-CAPA system

Scott Harrison
April 17, 2001
05/28/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. Cause 'www' to be a member of the group 'dc103'
   Change this line in /etc/group
   dc103:x:NUMBER:   
   to be
   dc103:x:NUMBER:www
5. Set permissions for /home/dc103 and /home/dc103/public_html
    to be readable and writeable by www.
    chmod g+rw /home/dc103; chmod g+rw /home/dc103/public_html
6. login as user=www
7. cd /home/httpd/lonUsers
8. install -d 103/d/c/1/dc103
9. cd 103/d/c/1/dc103
10. echo "unix:" > passwd
11. 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;
12. Restart the lon processes (/etc/rc.d/init.d/loncontrol restart)
13. Restart the httpd processes (/etc/rc.d/init.d/httpd restart)
14. You may further define the domain coordinator user (i.e. dc103)
    by going to http://MACHINENAME/adm/createuser.


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