diff -Naurd build-tree.orig/apache_1.3.34/src/support/htpasswd.c build-tree/apache_1.3.34/src/support/htpasswd.c
--- build-tree.orig/apache_1.3.34/src/support/htpasswd.c	2004-05-05 11:24:30.000000000 +0200
+++ build-tree/apache_1.3.34/src/support/htpasswd.c	2004-05-05 11:23:45.000000000 +0200
@@ -369,6 +369,7 @@
     char record[MAX_STRING_LEN];
     char line[MAX_STRING_LEN];
     char pwfilename[MAX_STRING_LEN];
+    char extrafields[MAX_STRING_LEN];
     char *arg;
     int found = 0;
     int alg = ALG_CRYPT;
@@ -381,6 +382,8 @@
 
     signal(SIGINT, (void (*)(int)) interrupted);
 
+    extrafields[0] = '\0'; /* be sure it is initialized properly */
+    
     /*
      * Preliminary check to make sure they provided at least
      * three arguments, we'll do better argument checking as 
@@ -610,6 +613,14 @@
 		putline(ftemp, line);
 		continue;
 	    }
+	    strcpy(scratch, line);		/* make a clean copy of line */
+	    colon = strchr(scratch, ':');	/* skip the username */
+	    colon = strchr(colon+1, ':');	/* skip the password */
+	    if (colon != NULL) {		/* if != NULL there are extrafields */
+		strcpy(extrafields,colon);	/* copy them */
+	    } else {
+		extrafields[0] = '\0';		/* if not be sure that it is empty! */
+	    }
 	    found++;
 	    break;
 	}
@@ -624,6 +635,9 @@
     /*
      * Now add the user record we created.
      */
+    if (strlen(extrafields) > 0) {
+	strcat(record,extrafields);
+    }
     putline(ftemp, record);
     /*
      * If we're updating an existing file, there may be additional
