Mailing List Archive

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
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
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
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
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
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@kineticode.com]
Sent: August-24-10 11:19 AM
To: users@lists.bricolage.cc
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
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
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@gossamer-threads.com>
Gossamer Threads Inc. http://www.gossamer-threads.com/
Tel: (604) 687-5804 Fax: (604) 687-5806
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@gossamer-threads.com]
Sent: August-24-10 1:34 PM
To: users@lists.bricolage.cc
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@gossamer-threads.com>
Gossamer Threads Inc. http://www.gossamer-threads.com/
Tel: (604) 687-5804 Fax: (604) 687-5806