Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

reset admin password

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


Marshall.McDougall at gov

Aug 24, 2010, 5:59 AM

Post #1 of 9 (1750 views)
Permalink
reset admin password

Hello all,



Our Bricolage administrator has retired and now we need to find out what
the admin credentials are. How do I accomplish that task? We are
running Bricolage 1.10.2 and postgres 7.3.4. Thanks.



Regards, Marshall


greg at node79

Aug 24, 2010, 6:54 AM

Post #2 of 9 (1714 views)
Permalink
Re: reset admin password [In reply to]

Hi Marshall,

> Our Bricolage administrator has retired and now we need to find out what
> the admin credentials are. How do I accomplish that task? We are
> running Bricolage 1.10.2 and postgres 7.3.4. Thanks.

Have a look at the 'usr' table in the database. Passwords are hashed so there's no easy way to find out what the actual password is.

However, if you have your own username and password, the quickest way to access the account would be to go into the database and set the administrator's password to your own. Then you can log in as the administrator and reset the password.

Otherwise, have a look at the code for Bric::Util::AuthInternal and you can see how passwords are generated. You can use the code there to make your own hashed password and then replace the admin's password in the database.

HTH,
-Greg


david at kineticode

Aug 24, 2010, 8:14 AM

Post #3 of 9 (1711 views)
Permalink
Re: reset admin password [In reply to]

On Aug 24, 2010, at 6:54 AM, Greg Heo wrote:

> However, if you have your own username and password, the quickest way to access the account would be to go into the database and set the administrator's password to your own. Then you can log in as the administrator and reset the password.

Try

UPDATE usr
SET password = MD5('some new password')
WHERE login = 'adminlogin';

Best,

David


greg at node79

Aug 24, 2010, 8:57 AM

Post #4 of 9 (1709 views)
Permalink
Re: reset admin password [In reply to]

Isn't there a salt on the password though? (Bric::Util::AuthInternal) I didn't think MD5 on the plain password would work as well.


On 24 Aug 2010, at 11:14 AM, David E. Wheeler wrote:

>> However, if you have your own username and password, the quickest way to access the account would be to go into the database and set the administrator's password to your own. Then you can log in as the administrator and reset the password.
>
> Try
>
> UPDATE usr
> SET password = MD5('some new password')
> WHERE login = 'adminlogin';
>
> Best,
>
> David


david at kineticode

Aug 24, 2010, 9:19 AM

Post #5 of 9 (1710 views)
Permalink
Re: reset admin password [In reply to]

On Aug 24, 2010, at 8:57 AM, Greg Heo wrote:

> Isn't there a salt on the password though? (Bric::Util::AuthInternal) I didn't think MD5 on the plain password would work as well.

Oh, that's right, I forgot. So something like:

use Bric::Biz::Person::User;
my $user = Bric::Biz::Person::User->lookup({ login => 'gh' });
$user->set_password('new pass');
$user->save;

Best,

David


Marshall.McDougall at gov

Aug 24, 2010, 11:11 AM

Post #6 of 9 (1711 views)
Permalink
RE: reset admin password [In reply to]

I appreciate the replies, however, I am not sure where to use this one.

-----Original Message-----
From: David E. Wheeler [mailto:david [at] kineticode]
Sent: August-24-10 11:19 AM
To: users [at] lists
Subject: Re: reset admin password

On Aug 24, 2010, at 8:57 AM, Greg Heo wrote:

> Isn't there a salt on the password though? (Bric::Util::AuthInternal)
I didn't think MD5 on the plain password would work as well.

Oh, that's right, I forgot. So something like:

use Bric::Biz::Person::User;
my $user = Bric::Biz::Person::User->lookup({ login => 'gh' });
$user->set_password('new pass');
$user->save;

Best,

David


david at kineticode

Aug 24, 2010, 11:19 AM

Post #7 of 9 (1708 views)
Permalink
Re: reset admin password [In reply to]

On Aug 24, 2010, at 11:11 AM, McDougall, Marshall (IEM) wrote:

> I appreciate the replies, however, I am not sure where to use this one.

Write a Perl script with the Perl used by your Bricolage install, e.g.,

#!/usr/local/bin/perl

Then make sure it can find the Bricolage libraries

use lib '/usr/local/bricolage/lib';

Then paste in the code I had before. That uses the Bricolage API to find the user, change its password, then save it.

HTH,

David


alex at gossamer-threads

Aug 24, 2010, 11:33 AM

Post #8 of 9 (1703 views)
Permalink
Re: reset admin password [In reply to]

Hi,

> Our Bricolage administrator has retired and now we need to find out what
> the admin credentials are. How do I accomplish that task? We are
> running Bricolage 1.10.2 and postgres 7.3.4. Thanks.

What we do for this is from postgres:

update usr set password = '' where login = 'admin'

and then you can login with admin and no password and then use the web
admin to change the password.

Cheers,

Alex

--
Alex Krohn <alex [at] gossamer-threads>
Gossamer Threads Inc. http://www.gossamer-threads.com/
Tel: (604) 687-5804 Fax: (604) 687-5806


Marshall.McDougall at gov

Aug 24, 2010, 11:46 AM

Post #9 of 9 (1708 views)
Permalink
RE: reset admin password - SOLVED! [In reply to]

And the winner is Alex Krohn. That worked magnificently, especially for
a simple man like myself.

Thanks to all who replied.

Regards, Marshall

-----Original Message-----
From: Alex Krohn [mailto:alex [at] gossamer-threads]
Sent: August-24-10 1:34 PM
To: users [at] lists
Subject: Re: reset admin password

Hi,

> Our Bricolage administrator has retired and now we need to find out
what
> the admin credentials are. How do I accomplish that task? We are
> running Bricolage 1.10.2 and postgres 7.3.4. Thanks.

What we do for this is from postgres:

update usr set password = '' where login = 'admin'

and then you can login with admin and no password and then use the web
admin to change the password.

Cheers,

Alex

--
Alex Krohn <alex [at] gossamer-threads>
Gossamer Threads Inc. http://www.gossamer-threads.com/
Tel: (604) 687-5804 Fax: (604) 687-5806

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.