Red Hat Bugzilla – Bug 1069252
[QE] (6.3.0) add-user.sh is not working with cygwin
Last modified: 2014-07-08 20:20:50 EDT
Description of problem: Trying to use add-user.sh script with cygwin gives me IllegalStateException. Version-Release number of selected component (if applicable): EAP 6.3.0.DR0 How reproducible: Always Steps to Reproduce: 1. use ./add-user.sh with cygwin Actual results: cygpath: can't convert empty path Exception in thread "main" java.lang.IllegalStateException: JBAS015232: No java.io.Console available to interact with user. at org.jboss.as.domain.management.security.adduser.AddUser.<init>(AddUser.java:74) at org.jboss.as.domain.management.security.adduser.AddUser.main(AddUser.java:215) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.modules.Module.run(Module.java:292) at org.jboss.modules.Main.main(Main.java:455) Expected results: Add-user dialogue will appear. Additional info: This one is continue of BZ1057625
duplicate of bug 1056130 see also bug 1057625 and bug 1027165
Darran, can you please look into it? Thanks!
Investigating this one further the error message does actually appear to be correct, when Java processes are executed in cygwin there is no java.io.Console available to us - this means we have no API available to read a masked password. One option could be to see if add-user can be ported to AESH which is already used by the CLI and has password masking capabilities, the problem however is that it would be too large a change to make into EAP 6.3 and as this error means cygwin has never worked I would be more inclined to class it as an RFE for that level of change. However there is one pre-Java 6 solution that involves a second thread to mask the input, I am going to review if this can be combined with using a Scanner to mask input without needing the second thread. http://www.cse.chalmers.se/edu/course/TDA602/Eraserlab/pwdmasking.html But if that does not work at this time this issue may need a NACK.
The changes required to achieve this are too large, if we want to add support for Cygwin it will need to be an RFE.
Moving Target Release to 6.3.1 to ensure this gets picked up in the 6.3.0 Release Notes as a Known Issue. Darran, if this has an impact on your workflow, feel free to change it back once the 6.3.0 GA docs have been published.