Description of problem: add-user.sh exists with status code 0 when the password complexity check fails. This should exit with status code 1 instead. Version-Release number of selected component (if applicable): 6.2.0 How reproducible: ./add-user.sh -u derp -p 1234; echo $? Actual results: 0 Expected results: 1 Additional info:
IMHO, its not a bug. It works like that by design since we catch the PasswordValidationException which is threw from LengthRestriction, and generate a new ErrorState to print error message into terminal. Due to this, the exit status code is 0.
The script fails to create the user, so IMO it should exit with an error status. For example, I'm trying to use this script as part of a Chef recipe that needs to create an admin account. Due to this behavior, I can't use the exit status of the script to determine if the account creation was successful.
A good fix to add on a CPxx release, so I propose 6.3.1 (could not find flag)
If this issue is going to become the issue for EAP 6.3.1 which issue is going to track EAP 6.4.0? Without an ACKed issue for EAP 6.4.0 I don't believe this can go into EAP 6.3.1 unless we are handling that one differently.
Verified on EAP 6.4.0.DR1.1
fix requested for next EAP CP