              String strFieldText = null;
              String strSet = null;
              String strText = null;
-@@ -384,8 +238,8 @@ public class UserInputPanelConsoleHelper extends PanelConsoleHelper implements P
+@@ -384,9 +240,29 @@ public class UserInputPanelConsoleHelper extends PanelConsoleHelper implements P
              {
                  strFieldText = description.getAttribute(TEXT);
              }
 -            choicesList.add(new Choice(strText, null, strSet));
 -            return new Input(strVariableName, strSet, choicesList, TEXT_FIELD, strFieldText, 0);
+-
 +            Choice choice = new Choice(strText, null, strSet);
 +            return new Text(strVariableName, true, strSet, choice, strFieldText);
- 
++        }
++        else if (PASSWORD_FIELD.equals(strFieldType)) {
++            IXMLElement spec = field.getFirstChildNamed(SPEC);
++            String pwd1, pwd2;
++            if (spec != null)
++            {
++            	List<IXMLElement> pwdElements = field.getChildrenNamed("pwd");
++            	if (pwdElements.size() != 2) {
++            		throw new RuntimeException("Currently only two pwd values" +
++            				" are supported in a password field");
++            	}
++            	pwd1 = pwdElements.get(0).getAttribute("txt");
++            	pwd2 = pwdElements.get(1).getAttribute("txt");
++            	if (pwd1 == null || pwd2 == null) {
++            		throw new RuntimeException("Pwd elements need to specify " +
++            				"a text attribute in a password field");
++            	}
++            } else {
++            	throw new RuntimeException("Password field needs specification");
++            }
++            return new Password(strVariableName, pwd1, pwd2);
          }
          else if (COMBO_FIELD.equals(strFieldType) || RADIO_FIELD.equals(strFieldType))
-@@ -409,44 +263,342 @@ public class UserInputPanelConsoleHelper extends PanelConsoleHelper implements P
+         {
+@@ -409,44 +285,384 @@ public class UserInputPanelConsoleHelper extends PanelConsoleHelper implements P
                  choicesList.add(new Choice(choice.getAttribute(TEXT), choice.getAttribute(VALUE),
                          choice.getAttribute(SET)));
              }

+				return Option.full(number);
+			}
+		});
+	}	
+}
\ No newline at end of file
diff --git a/src/lib/com/izforge/izpack/installer/ConsoleInstallHelper.java b/src/lib/com/izforge/izpack/installer/ConsoleInstallHelper.java

+		}
+    }
+    
+    class Password extends Input {
+
+		private final String pwd1;
+		private final String pwd2;
+
+		protected Password(String variableName, String pwd1, String pwd2) {
+			super(variableName);
+			this.pwd1 = pwd1;
+			this.pwd2 = pwd2;
+		}
+
+		boolean process(AutomatedInstallData idata) throws IOException {
+			
+			String input1 = null;
+			String input2 = null;
+			
+			while (true) {
+				input1 = helper.console.askForPassword(pwd1);
+				input2 = helper.console.askForPassword(pwd2);
+				
+				if (input1 != null && input1.equals(input2)) 
+				{
+					break; // we have two the same non-null passwords
+				} 
+				else 
+				{
+					helper.console.displayMessage("Please enter two " +
+							"non-empty passwords");
+				}
+			}
+			
+            idata.setVariable(getVariableName(), input1);
+			
+			return true;
+		}
+    }
+    
+    class StaticText extends Text {
+    	public StaticText(String strVariableName, String text) {
+    		super(strVariableName, false, null, null, text);
