Friday, January 1, 2010

How to add user in your eclipse Jboss when you don't know what is the admin password

How to add user in your eclipse Jboss when you don't know what is the admin password


Please check these commands below.

Thiago:bin t$ ./add-user.sh
./add-user.sh: line 66: /opt/homebrew-cask/Caskroom/java7/1.7.0_80/bin/java: No such file or directory
Thiago:bin t$ java -version
Unable to locate an executable at "/opt/homebrew-cask/Caskroom/java7/1.7.0_80/bin/java" (-1)
Thiago:bin t$ which java
/usr/bin/java

- This error above is because you are trying to use add_user script with an non-root user.


Thiago:bin t$
Thiago:bin t$ sudo su
Password:
sh-3.2# cd /Users/jboss-as-7.1.1.Final/bin/

Now just run it:

sh-3.2# ./add-user.sh

What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): a

Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : thiagoleoncio
Password :
Re-enter Password :
About to add user 'thiagoleoncio' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'thiagoleoncio' to file '/Users/jboss-as-7.1.1.Final/standalone/configuration/mgmt-users.properties'
Added user 'thiagoleoncio' to file '/Users/jboss-as-7.1.1.Final/domain/configuration/mgmt-users.properties'


I hope it helps and happy coding,
Thiago Leoncio.