Index: fedkit/Makefile
===================================================================
--- fedkit/Makefile	(revision b4624b243fe0cc6357dae2c1293278e6df7e14a2)
+++ fedkit/Makefile	(revision b7f6cccc78b4592ea8ef904b2b23964002a5e222)
@@ -1,3 +1,3 @@
-BINARIES=federate.sh smbmount.FreeBSD.pl smbmount.Linux.pl \
+BINARIES=federate.sh federate.pl smbmount.FreeBSD.pl smbmount.Linux.pl \
 	 make_hosts fed-tun.pl fed_evrepeater rc.fedaccounts \
 	 config_from_tunnelip.pl active_config.pl combo.pl \
Index: fedkit/rc.fedaccounts
===================================================================
--- fedkit/rc.fedaccounts	(revision b4624b243fe0cc6357dae2c1293278e6df7e14a2)
+++ fedkit/rc.fedaccounts	(revision b7f6cccc78b4592ea8ef904b2b23964002a5e222)
@@ -39,5 +39,5 @@
 
 my $old_accts = "/usr/local/federation/etc/old_accts";
-my $accts = "/usr/local/federation/etc/accts";
+my $accts = "/usr/local/federation/etc/userconf";
 
 fatal("Need both $old_accts and $accts") unless -e $old_accts && -e $accts;
@@ -81,16 +81,34 @@
 	os_groupadd($group, $gid);
     };
-    /^ADDUSER\s+LOGIN=([-\w]+)\s+PSWD=([^:]+)\s+UID=(\d+)\s+GID=(\d+)\s+
-	ROOT=(\d)\s+NAME="([^"]+)"\s+HOMEDIR=(\S+)\s+GLIST="([^"]*)"\s+
-	SERIAL=(\d+)\s+EMAIL="([^"]*)"\s+SHELL=(\S+)/x && do {
-	    my ($login, $pswd, $uid, $gid, $root, $name, $hdir, $glist, 
-		$serial, $email, $shell) = 
-	    ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11);
+    /^ADDUSER\s+/ && do { 
+	my $login;
+	my $pswd;
+	my $uid;
+	my $gid;
+	my $root;
+	my $name;
+	my $hdir;
+	my $glist;
+	my $serial;
+	my $email;
+	my $shell;
 
-	    print "Adding $login $uid $gid\n";
-	    os_useradd($login, $uid, $gid, $pswd, "$glist", $hdir, $name, 
-		$root, $shell);
-	    os_mkdir($hdir, "0755") unless -e $hdir;
-	    next;
+	/LOGIN=([\S]+)/ && do { $login = $1; }; 
+	/PSWD=(\S+)/ && do { $pswd=$1; } ;
+	/UID=(\d+)/ && do { $uid = $1; };
+	/GID=(\d+)/ && do { $gid = $1; };
+	/ROOT=(\d)/ && do { $root = $1; }; 
+	/NAME="([^"]*)"/ && do { $name = $1; };
+	/HOMEDIR=(\S+)/ && do { $hdir = $1; };
+	/GLIST="([^"]*)"/ && do { $glist = $1; }; 
+	/SERIAL=(\d+)/ && do { $serial = $1; };
+	/EMAIL="([^"]*)"/ && do { $email=$1; };
+	/SHELL=(\S+)/ && do { $shell = $1; };
+
+	print "Adding $login $uid $gid\n";
+	os_useradd($login, $uid, $gid, $pswd, "$glist", $hdir, $name, 
+	    $root, $shell);
+	os_mkdir($hdir, "0755") unless -e $hdir;
+	next;
     };
 }
Index: fedkit/smbmount.FreeBSD.pl
===================================================================
--- fedkit/smbmount.FreeBSD.pl	(revision b4624b243fe0cc6357dae2c1293278e6df7e14a2)
+++ fedkit/smbmount.FreeBSD.pl	(revision b7f6cccc78b4592ea8ef904b2b23964002a5e222)
@@ -40,5 +40,6 @@
 }
 
-open(TM, "$TMCC accounts windows |") or die("Failed to execute TMCC");
+# open(TM, "$TMCC accounts windows |") or die("Failed to execute TMCC");
+open(TM, "/usr/local/federation/etc/userconf")or die("Failed to open userconf");
 open(CONFIG, ">/etc/nsmb.conf") or die("Failed to open /etc/nsmb.conf");
 open(MAP, ">$AMDMAP") or die("Failed to open $AMDMAP");
@@ -52,52 +53,54 @@
 
 while(<TM>) {
-        if (/ADDUSER LOGIN=(\S+) PSWD=(\S+) UID=(\d+) GID=(\d+).*HOMEDIR=(\S+) / ) {
-                $user = $1;
-                $pswd = $2;
-                $uid  = $3;
-                $gid  = $4;
-                $homedir = $5;
+    /ADDUSER/ && do {
+	/LOGIN=(\S+)/ && do { $user = $1; };
+	/WPSWD=(\S+)/ && do { $pswd = $1; };
+	/UID=(\S+)/ && do { $uid = $1; };
+	/GID=(\S+)/ && do { $gid = $1; };
+	/HOMEDIR=(\S+)/ && do { $homedir = $1; };
 
-		$userlc = $user;
-		# SMB demands upper case.
-		$user =~  tr/a-z/A-Z/;
-		my $pass = `smbutil crypt '$pswd'`;
+	$userlc = $user;
+	# SMB demands upper case.
+	$user =~  tr/a-z/A-Z/;
+	my $pass = `smbutil crypt '$pswd'`;
 
-                print CONFIG "[$SHARE:$user]\npassword=$pass\n";
-		
-		if(! -d "$AMDROOT$homedir") {
-			system("$MKDIR -p $AMDROOT$homedir") && die("Failed to make directory");
-		}
+	print CONFIG "[$SHARE:$user]\npassword=$pass\n";
+	
+	if(! -d "$AMDROOT$homedir") {
+		system("$MKDIR -p $AMDROOT$homedir") && 
+		    die("Failed to make directory");
+	}
 
-		print FSTAB "//$user\@$SHARE/$user\t";
-		print FSTAB "$AMDROOT$homedir\tsmbfs\t";
- 		print FSTAB "noauto,rw,-N,-f744,-d755,-u$uid,-g$gid\t0\t0\n";
+	print FSTAB "//$user\@$SHARE/$user\t";
+	print FSTAB "$AMDROOT$homedir\tsmbfs\t";
+	print FSTAB "noauto,rw,-N,-f744,-d755,-u$uid,-g$gid\t0\t0\n";
 
-		print MAP "\n$userlc type:=program;fs:=$AMDROOT$homedir;\\\n";
-		print MAP "mount:=\"$MOUNT mount $AMDROOT$homedir\";\\\n";
-		print MAP "unmount:=\"$UMOUNT unmount $AMDROOT$homedir\";";
+	print MAP "\n$userlc type:=program;fs:=$AMDROOT$homedir;\\\n";
+	print MAP "mount:=\"$MOUNT mount $AMDROOT$homedir\";\\\n";
+	print MAP "unmount:=\"$UMOUNT unmount $AMDROOT$homedir\";";
 
-		#
-		# If we are PUSER, the user assigned to mount the project directory,
-		# then we add in the mount for that.  The share is called proj-$PNAME
-		# where PNAME is the name of the project at the mothership.  We need
- 		# a second map for this since we will be mounting under /proj.
-		# We should really not use share in federation.
-		#
+	#
+	# If we are PUSER, the user assigned to mount the project directory,
+	# then we add in the mount for that.  The share is called proj-$PNAME
+	# where PNAME is the name of the project at the mothership.  We need
+	# a second map for this since we will be mounting under /proj.
+	# We should really not use share in federation.
+	#
 
-		if($user =~ m/$PUSER/i) {
-			print FSTAB "//$user\@$SHARE/proj-$PNAME\t";
-			print FSTAB "$AMDROOT/proj\tsmbfs\t";
-			print FSTAB "noauto,rw,-N,-f774,-d775,-u$uid,-g$gid\t0\t0\n";
+	if($user =~ m/$PUSER/i) {
+	    print FSTAB "//$user\@$SHARE/proj-$PNAME\t";
+	    print FSTAB "$AMDROOT/proj\tsmbfs\t";
+	    print FSTAB "noauto,rw,-N,-f774,-d775,-u$uid,-g$gid\t0\t0\n";
 
-			print PMAP "$PNAME type:=program;fs:=$AMDROOT/proj;\\\n";
-			print PMAP "mount:=\"$MOUNT mount $AMDROOT/proj\";\\\n";
-			print PMAP "unmount:=\"$UMOUNT unmount $AMDROOT/proj\";\n";
+	    print PMAP "$PNAME type:=program;fs:=$AMDROOT/proj;\\\n";
+	    print PMAP "mount:=\"$MOUNT mount $AMDROOT/proj\";\\\n";
+	    print PMAP "unmount:=\"$UMOUNT unmount $AMDROOT/proj\";\n";
 
-			if(! -d "$AMDROOT/proj") {
-				system("$MKDIR -p $AMDROOT/proj") && die("Failed to make directory");
-			}
-		}
-        }
+	    if(! -d "$AMDROOT/proj") {
+		    system("$MKDIR -p $AMDROOT/proj") && 
+			die("Failed to make directory");
+	    }
+	}
+    }
 }
 
Index: fedkit/smbmount.Linux.pl
===================================================================
--- fedkit/smbmount.Linux.pl	(revision b4624b243fe0cc6357dae2c1293278e6df7e14a2)
+++ fedkit/smbmount.Linux.pl	(revision b7f6cccc78b4592ea8ef904b2b23964002a5e222)
@@ -43,5 +43,6 @@
 }
 
-open(TM, "$TMCC accounts windows |") or die("Failed to execute TMCC");
+# open(TM, "$TMCC accounts windows |") or die("Failed to execute TMCC");
+open(TM, "/usr/local/federation/etc/userconf")or die("Failed to open userconf");
 open(FSTAB,">>$FSTAB") or die("Cannot Open File $FSTAB");
 
@@ -49,36 +50,39 @@
 
 while(<TM>) {
-        if (/ADDUSER LOGIN=(\S+) PSWD=(\S+) UID=(\d+) GID=(\d+).*HOMEDIR=(\S+) / ) {
-		($user, $pswd, $uid, $gid, $homedir) = ($1, $2, $3, $4, $5);
+    /ADDUSER/ && do {
+	/LOGIN=(\S+)/ && do { $user = $1; };
+	/WPSWD=(\S+)/ && do { $pswd = $1; };
+	/UID=(\S+)/ && do { $uid = $1; };
+	/GID=(\S+)/ && do { $gid = $1; };
+	/HOMEDIR=(\S+)/ && do { $homedir = $1; };
 
+	open(PWDFILE, ">/tmp/$user.cifs_creds") || 
+	    warn "Can't create credentials for $user:$!\n";
+	print PWDFILE "username=$user\npassword=$pswd\n";
+	close(PWDFILE);
+	chmod(0600, "/tmp/$user.cifs_creds") == 1 || 
+	    warn "Credential file /tmp/$user.cifs_creds may have " .
+		"bad permissions:$!\n";
 
-		open(PWDFILE, ">/tmp/$user.cifs_creds") || 
-		    warn "Can't create credentials for $user:$!\n";
-		print PWDFILE "username=$user\npassword=$pswd\n";
-		close(PWDFILE);
-		chmod(0600, "/tmp/$user.cifs_creds") == 1 || 
-		    warn "Credential file /tmp/$user.cifs_creds may have " .
-			"bad permissions:$!\n";
+	print FSTAB "//$SHARE/$user\t";
+	print FSTAB "$homedir\tcifs\t";
+	print FSTAB "auto,rw,credentials=/tmp/$user.cifs_creds,ip=$ADDR\t0\t0\n";
 
-		print FSTAB "//$SHARE/$user\t";
-		print FSTAB "$homedir\tcifs\t";
- 		print FSTAB "auto,rw,credentials=/tmp/$user.cifs_creds,ip=$ADDR\t0\t0\n";
+	#
+	# If we are PUSER, the user assigned to mount the project
+	# directory, then we add in the mount for that.  The share is
+	# called proj-$PNAME where PNAME is the name of the project at
+	# the mothership.  We need a second map for this since we will
+	# be mounting under /proj.  We should really not use share in
+	# federation.
+	#
 
-		#
-		# If we are PUSER, the user assigned to mount the project
-		# directory, then we add in the mount for that.  The share is
-		# called proj-$PNAME where PNAME is the name of the project at
-		# the mothership.  We need a second map for this since we will
-		# be mounting under /proj.  We should really not use share in
-		# federation.
-		#
+	if($user =~ m/$PUSER/i) {
+	    print FSTAB "//$SHARE/proj-$PNAME\t";
+	    print FSTAB "$PROJROOT/$PNAME\tcifs\t";
+	    print FSTAB "rw,credentials=/tmp/$user.cifs_creds,ip=$ADDR\t0\t0\n";
 
-		if($user =~ m/$PUSER/i) {
-			print FSTAB "//$SHARE/proj-$PNAME\t";
-			print FSTAB "$PROJROOT/$PNAME\tcifs\t";
-			print FSTAB "rw,credentials=/tmp/$user.cifs_creds,ip=$ADDR\t0\t0\n";
-
-		}
-        }
+	}
+    }
 }
 
