Index: fedkit/smbmount.FreeBSD.pl
===================================================================
--- fedkit/smbmount.FreeBSD.pl	(revision f3691ff3ae25d3b83c09aa21905fb9320e79cad2)
+++ fedkit/smbmount.FreeBSD.pl	(revision c0a87382246b6648d529a529432f52afbe185aa7)
@@ -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");
+	    }
+	}
+    }
 }
 
