File:  [LON-CAPA] / doc / Attic / how_to_domain_coordinator.txt
Revision 1.4: download - view: text, annotated - select for diffs
Mon May 28 17:48:23 2001 UTC (22 years, 11 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
adding in last date of modification

    1: How to make a domain coordinator on
    2: a newly installed LON-CAPA system
    3: 
    4: Scott Harrison
    5: April 17, 2001
    6: 05/28/2001
    7: 
    8: Example situation:
    9: Adding a user "dc103" to be a domain coordinator
   10: for the domain 103.
   11: 
   12: 1. login as super-user
   13: 2. /usr/sbin/adduser dc103
   14: 3. passwd dc103
   15:    enter in a password
   16: 4. Cause 'www' to be a member of the group 'dc103'
   17:    Change this line in /etc/group
   18:    dc103:x:NUMBER:   
   19:    to be
   20:    dc103:x:NUMBER:www
   21: 5. Set permissions for /home/dc103 and /home/dc103/public_html
   22:     to be readable by www.
   23: 6. login as user=www
   24: 7. cd /home/httpd/lonUsers
   25: 8. install -d 103/d/c/1/dc103
   26: 9. cd 103/d/c/1/dc103
   27: 10. echo "unix:" > passwd
   28: 11. Run the following script with the arguments
   29: [script] 103 dc103
   30: 
   31: #!/usr/bin/perl
   32: 
   33: # quick temporary script
   34: # brought up-to-date by Scott Harrison, 03/01/2001
   35: 
   36: 
   37: print "Usage: rolesmanip.pl DOMAIN USERNAME\n" unless @ARGV;
   38: 
   39: my $domain=shift @ARGV;
   40: my $name=shift @ARGV;
   41: 
   42: my ($l1,$l2,$l3)=split(//,substr($name,0,3));
   43: 
   44: use GDBM_File;
   45: my %hash;
   46:         tie(%hash,'GDBM_File',
   47: "/home/httpd/lonUsers/$domain/$l1/$l2/$l3/$name/roles.db",
   48: 	    &GDBM_WRCREAT,0640);
   49: 
   50: $hash{'/'.$domain.'/_dc'}='dc';
   51: open OUT, ">/home/httpd/lonUsers/$domain/$l1/$l2/$l3/$name/roles.hist";
   52: map {
   53:     print OUT $_.' : '.$hash{$_}."\n";
   54: } keys %hash;
   55: close OUT;
   56: 
   57: untie %hash;
   58: 12. Restart the lon processes (/etc/rc.d/init.d/loncontrol restart)

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