You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by Anoop kumar V <an...@gmail.com> on 2007/01/29 17:43:07 UTC
Change a user role to build admin
I have lost the password to the only continuum admin. But I do have a lot of
other users. Instead of going through sha1 password hashing etc, I think I
can just change one of the existing users role to build admin and use that
to reset the admin's password. How do I do that?
I know I can log into the derby db as sa.. but dont know how to log in to
derby. Thanks.
--
Thanks and best regards,
Anoop
Re: Change a user role to build admin
Posted by Anoop kumar V <an...@gmail.com>.
Sure..I will.
Anoop
On 1/29/07, Wendy Smoak <ws...@gmail.com> wrote:
>
> On 1/29/07, Anoop kumar V <an...@gmail.com> wrote:
>
> > Never mind - I figured this out.
> >
> > Here are the steps I needed to follow:
>
> Thanks. :) Would you care to update the FAQ with this information?
> Currently our only good suggestion is to make sure you have more than
> one admin account.
>
> http://docs.codehaus.org/display/CONTINUUMUSER/Continuum+FAQ
>
> --
> Wendy
>
--
Thanks and best regards,
Anoop
Re: Change a user role to build admin
Posted by Wendy Smoak <ws...@gmail.com>.
On 1/29/07, Anoop kumar V <an...@gmail.com> wrote:
> Never mind - I figured this out.
>
> Here are the steps I needed to follow:
Thanks. :) Would you care to update the FAQ with this information?
Currently our only good suggestion is to make sure you have more than
one admin account.
http://docs.codehaus.org/display/CONTINUUMUSER/Continuum+FAQ
--
Wendy
Re: Change a user role to build admin
Posted by tinne <ti...@adesso.de>.
anoopkumar wrote:
>
> Never mind - I figured this out.
>
> 8. ij> connect
> 'jdbc:derby:/usr/local/continuum-1.0.3/apps/continuum/database';
> ij> select * from sa.continuumuser;
> ij> UPDATE SA.CONTINUUMUSER set GROUP_ID_OID=1 where ACCOUNT_ID = 6;
> 1 row inserted/updated/deleted
> ij> commit;
>
This looks pretty outdated. As of continuum 1.2, the database has been split
into a continuum and a users database (which can be found in the logs
directory for some strange reason!). The following worked for me (under
cygwin):
1.) export DERBY_HOME=`cygpath -wa /cygdrive/c/Programme/derby/10.4.2.0`
2.) export
CLASSPATH=$DERBY_HOME\\lib\\derby.jar\;$DERBY_HOME\\lib\\derbytools.jar
3.) export PATH=`cygpath -ua $DERBY_HOME`/bin:$PATH
4.) ij.bat
4a.) connect
'jdbc:derby:C:\Programme\Continuum\1.2\logs\data\databases\users';
4b.) select * from sa.jdouser;
4c.) update sa.jdouser set encoded_password = '<some other user's password>'
where username = 'admin';
4d.) update sa.jdouser set count_failed_login_attempts = 0 where username =
'admin';
4e.) commit;
4f.) exit;
Please note that both the table and the database have changed. Also, my
approach is to reset the password to the one of a normal user and to reset
the failure count. On re-running continuum, simply login with the user's
password and change it.
--
View this message in context: http://www.nabble.com/Change-a-user-role-to-build-admin-tp8692812p21329384.html
Sent from the Continuum - Users (old) mailing list archive at Nabble.com.
Re: Change a user role to build admin
Posted by Anoop kumar V <an...@gmail.com>.
Never mind - I figured this out.
Here are the steps I needed to follow:
1. Install Derby db from
http://db.apache.org/derby/derby_downloads.html
2. Set DERBY_HOME like: export DERBY_HOME=~/derby/db-
derby-10.2.2.0-bin/
3. set classpath like this: export
CLASSPATH=$DERBY_HOME/lib/derby.jar:$DERBY_HOME/lib/derbytools.jar
4. Then run ij to start the derby database, like this: ~/derby/db-
derby-10.2.2.0-bin/bin/ij
5. I got the ij> prompt.
6. Ensure that continuum is shut down. I use kill <pid of continuum.>
7. At the ij> prompt, start the db, like this: connect
'jdbc:derby:/usr/local/continuum-1.0.3/apps/continuum/database';
8. ij> connect 'jdbc:derby:/usr/local/continuum-1.0.3
/apps/continuum/database';
ij> select * from sa.continuumuser;
9. Next modify the data using a simple sql, like this:
ij> describe sa.continuumuser;
COLUMN_NAME
|TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
ACCOUNT_ID |INTEGER |0 |10 |10 |NULL |NULL
|NO
EMAIL |VARCHAR |NULL|NULL|255 |NULL |510
|YES
FULL_NAME |VARCHAR |NULL|NULL|255 |NULL |510
|YES
GROUP_ID_OID |INTEGER |0 |10 |10 |NULL |NULL
|YES
GUEST |CHAR |NULL|NULL|1 |NULL |2
|NO
HASHED_PASSWORD |VARCHAR |NULL|NULL|255 |NULL |510
|YES
MODEL_ENCODING |VARCHAR |NULL|NULL|255 |NULL |510
|YES
USERNAME |VARCHAR |NULL|NULL|255 |NULL |510
|YES
8 rows selected
ij> UPDATE SA.CONTINUUMUSER set GROUP_ID_OID=1 where ACCOUNT_ID = 6;
1 row inserted/updated/deleted
ij> commit;
ij> exit;
Thanks,
Anoop
On 1/29/07, Anoop kumar V <an...@gmail.com> wrote:
>
> I have lost the password to the only continuum admin. But I do have a lot
> of other users. Instead of going through sha1 password hashing etc, I think
> I can just change one of the existing users role to build admin and use that
> to reset the admin's password. How do I do that?
>
> I know I can log into the derby db as sa.. but dont know how to log in to
> derby. Thanks.
>
> --
> Thanks and best regards,
> Anoop
--
Thanks and best regards,
Anoop