Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1069252 - [QE] (6.3.0) add-user.sh is not working with cygwin
[QE] (6.3.0) add-user.sh is not working with cygwin
Status: CLOSED CANTFIX
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Scripts and Commands (Show other bugs)
6.3.0
Unspecified Unspecified
unspecified Severity medium
: ---
: EAP 6.3.1
Assigned To: Darran Lofthouse
Petr Kremensky
Russell Dickenson
:
Depends On:
Blocks: 1072231
  Show dependency treegraph
 
Reported: 2014-02-24 10:14 EST by Petr Kremensky
Modified: 2014-07-08 20:20 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
In this release of JBoss EAP 6, the `add-user.sh` script will fail with an `IllegalStateException`. This bug presents when Java processes are executed in Cygwin becuase there is no java.io.Console available, meaning there is no API available to read a masked password. It is expected to be resolved in a future release of the product.
Story Points: ---
Clone Of:
: 1072231 (view as bug list)
Environment:
Last Closed: 2014-07-08 09:40:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Kremensky 2014-02-24 10:14:11 EST
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
Comment 1 Aleksandar Kostadinov 2014-02-24 10:42:34 EST
duplicate of bug 1056130
see also bug 1057625 and bug 1027165
Comment 2 Permaine Cheung 2014-02-27 09:37:19 EST
Darran, can you please look into it? Thanks!
Comment 3 Darran Lofthouse 2014-04-24 14:40:35 EDT
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.
Comment 5 Darran Lofthouse 2014-07-08 09:40:11 EDT
The changes required to achieve this are too large, if we want to add support for Cygwin it will need to be an RFE.
Comment 6 Scott Mumford 2014-07-08 20:20:50 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.