How to reset the admin password

compared with
Current by NotSupportContact-Mark Carey
on Feb 06, 2015 14:14.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (16)

View Page History

h5. In 7.0.2 :
To reset or change the password for users authenticated against the GroundWork jboss-idm database, run the following command:
{code:title=run as nagios user}
/etc/init.d/groundwork stop gwservices
psql -U jboss -h localhost -d jboss-idm -c "
UPDATE jbid_io_creden
SET text = md5('password')
WHERE identity_object_id = (SELECT identity_object_id
FROM jbid_io u, jbid_io_creden c
WHERE u.id = c.identity_object_id
AND name = 'username');
"
/etc/init.d/groundwork start gwservices
{code}
Where:
* 'password' is replaced with the password
* 'username' is replaced with the user name
* 'localhost' is replaced with the database server name (the {{\-h localhost}} part is optional if you are on the host where the database exists; it is necessary to identify the server if that is on a different server)

source /usr/local/groundwork/scripts/setenv.sh
Example: Resetting admin's password to: admin
{code:title=run as nagios user}
/etc/init.d/groundwork stop gwservices
psql -U jboss -h localhost -d jboss-idm -c "
UPDATE jbid_io_creden
SET text = md5('admin')
WHERE identity_object_id = (SELECT identity_object_id
FROM jbid_io u, jbid_io_creden c
WHERE u.id = c.identity_object_id
AND name = 'admin');
psql "
postgres=# \c jboss-idm
update jbid_io_creden set text = md5('admin') where identity_object_id = (select identity_object_id from jbid_io u, jbid_io_creden c where u.id = c.identity_object_id and name = 'admin');
/etc/init.d/groundwork start gwservices
{code}

This will not affect the password for other users. It will however log out all users.

h5. In GroundWork Monitor >=6.6.x:

To reset or change the password for users authenticated against the GroundWork jbossportal database, run the following command:

{code}
source /usr/local/groundwork/scripts/setenv.sh
{code:title=run as nagios user}
/etc/init.d/groundwork stop gwservices
export PGPASSWORD=jboss
psql -U jboss [-h localhost] -d jbossportal -c "
UPDATE jbp_users
SET jbp_password=md5('password')
WHERE jbp_uname='username'
"
export -n PGPASSWORD
/etc/init.d/groundwork start gwservices
{code}

Example: Resetting admin's password to: admin
{code}
{code:title=run as nagios user}
source /usr/local/groundwork/scripts/setenv.sh
/etc/init.d/groundwork stop gwservices
export PGPASSWORD=jboss
psql -U jboss -d jbossportal -c "
UPDATE jbp_users
WHERE jbp_uname='admin'
"
export -n PGPASSWORD
/etc/init.d/groundwork start gwservices
{code}