File:  [LON-CAPA] / doc / Attic / how_to_domain_coordinator.txt
Revision 1.3: download - view: text, annotated - select for diffs
Mon May 28 17:47:27 2001 UTC (22 years, 11 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
entering in extra steps for manually adding a domain
coordinator

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

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