Annotation of doc/how_to_domain_coordinator.txt, revision 1.1
1.1 ! harris41 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. login as user=www
! 16: 5. cd /home/httpd/lonUsers/103
! 17: 6. install -d d/c/103/dc103
! 18: 7. cd d/c/103/dc103
! 19: 8. echo "unix:" > passwd
! 20: 9. Run the following script with the arguments
! 21: [script] 103 dc103
! 22:
! 23: #!/usr/bin/perl
! 24:
! 25: # quick temporary script
! 26: # brought up-to-date by Scott Harrison, 03/01/2001
! 27:
! 28:
! 29: print "Usage: rolesmanip.pl DOMAIN USERNAME\n" unless @ARGV;
! 30:
! 31: my $domain=shift @ARGV;
! 32: my $name=shift @ARGV;
! 33:
! 34: my ($l1,$l2,$l3)=split(//,substr($name,0,3));
! 35:
! 36: use GDBM_File;
! 37: my %hash;
! 38: tie(%hash,'GDBM_File',
! 39: "/home/httpd/lonUsers/$domain/$l1/$l2/$l3/$name/roles.db",
! 40: &GDBM_WRCREAT,0640);
! 41:
! 42: $hash{'/'.$domain.'/_dc'}='dc';
! 43: open OUT, ">/home/httpd/lonUsers/$domain/$l1/$l2/$l3/$name/roles.hist";
! 44: map {
! 45: print OUT $_.' : '.$hash{$_}."\n";
! 46: } keys %hash;
! 47: close OUT;
! 48:
! 49: untie %hash;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>