Lost admin password

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
pincapalla
Posts: 4
Joined: Thu Sep 29, 2011 8:46 am

Lost admin password

Post by pincapalla »

Hi all, I have inherited a Cacti installation from my predecessor, with practically no doc.
There is Cacti installed on RHEL, with MySql database and Apache.
I have spent a couple of months with this customer up to now and I'm totally new with Cacti. I had three days of startup with my predecessor, and I didn't have the time to ask many questions.
My predecessor told me the admin password, but I cannot get it work, I get the message:
"Invalid User Name/Password Please Retype".
The guest user works with password guest.
I read all the doc, and I didn't get the point.
I tried from a web browser (IE and Firefox) with the supposed password and all the passwords I could guess.
I tried from shell with "mysql --user=root mysql" as found in the doc, with user root, cacti, admin, and with all kind of passwords I could think and I keep on receiving answer: "Access denied".
Is there anybody who can tell me how to retrieve/change the admin password please?
Thanks so much for any help!!!
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Lost admin password

Post by noname »

pincapalla
Posts: 4
Joined: Thu Sep 29, 2011 8:46 am

Re: Lost admin password

Post by pincapalla »

Thanks so much for the answer.
I tried to understand the solution you suggested, but now I have one more doubt.
The main problem was that I can't access to the web GUI using user admin.
So, the command you suggested is "update...", but in order to use it I have to enter mysql, am I right?
And if I try to access mysql I get this:
# mysql
Error 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
# mysql --user=admin
Error 1045 (28000): Access denied for user 'admin'@'localhost' (using password: NO)
Then I tried the same two commands with --password, the I'm asked a password, and I tried to provide either the root password or the password I was told that should be the admin password (adminpwd), and I keep on receiving the same result: Access denied.
So, now I understood that I also miss the mysql password... :-(
Sorry if I wrote something wrong, and thanks so much for your patience and help
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Lost admin password

Post by noname »

pincapalla wrote:Thanks so much for the answer.
I tried to understand the solution you suggested, but now I have one more doubt.
The main problem was that I can't access to the web GUI using user admin.
So, the command you suggested is "update...", but in order to use it I have to enter mysql, am I right?
Yes.
GUI settings of Cacti (including account information in Cacti) are stored in MySQL database (e.g. "cacti").
pincapalla wrote:So, now I understood that I also miss the mysql password... :-(
MySQL username/password for Cacti's database is specified in 'cacti/include/config.php'.
See also: Install and Configure Cacti

You can try like this:
% mysql -uYOUR_DBUSER -p cacti
Password: YOUR_DBPASS
mysql> update user_auth set password = md5('admin') where username = 'admin';
mysql> exit;
pincapalla
Posts: 4
Joined: Thu Sep 29, 2011 8:46 am

Re: Lost admin password

Post by pincapalla »

THANKS!!! This sounds great! This is something I can perfectly understand! :-) I'll try it on monday afternoon, as soon as I arrive at the customer site, and I'll let you know. In the meantime I really thank you so much, and have a nice weekend!
pincapalla
Posts: 4
Joined: Thu Sep 29, 2011 8:46 am

Re: Lost admin password

Post by pincapalla »

GREAT!!! IT WORKED!!!! Thanks so much!!!
Have a nice week :-)
Bye!
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Lost admin password

Post by noname »

I'm glad to hear that.
Enjoy administering Cacti :)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest