locked out of freepbx / updating important default passwords

jimlawrnc
Posts: 126
Member Since:
2007-06-26

Since my trixbox is on wan, i wanted to change all the passwords for maint and admin

but now when i attempt to go into freepbx, i get a login box and fails to authenticate.
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

--------------------------------------------------------------------------------

Apache/2.2.3 (CentOS) Server at 192.168.31.253 Port 80

Poking around i found

#Password protect /var/www/html/admin

AuthType Basic
AuthName "Restricted Area"
AuthUserFile /usr/local/apache/passwd/wwwpasswd
Require user wwwadmin maint

SO i ran htpasswd wwwpasswd maint
typed in the maint password twice
restarted the httpd service but still cannot login.

my system is set to route all incoming calls to a voice mail box. I need to change this as well as set up a IVR. Can anyone get me out of this mess?



jades
Posts: 2340
Member Since:
2006-11-26
Can you try typing in

Can you try typing in CentOS:

passwd-maint

That should cchange the FreePBX password back to normal

If you can get onto the trixbox maint page but not the freepbx page, that changes the whole story. If this is your story, go to /etc/amportal.conf (or etc/asterisk/amportal.conf - i am not sure off my head) and look for AUTHTYPE=
make sure it says AUTHTYPE=none

--

Joseph Ades
josephades1_at_gmail_dot_com
(212) 937-4299



jimlawrnc
Posts: 126
Member Since:
2007-06-26
thank you got back in with

thank you got back in with changing the auth type to none.
furthermore, Is there a documented procedure to changing the passwords for trixbox? and where all the changes need to be made?



jades
Posts: 2340
Member Since:
2006-11-26
Change CentOS

Change CentOS password:
passwd

Main/FreePBX: passwd-maint

Change AMP password: passwd-amp

Change FOP password: nano -w /etc/amportal.conf. Replace passw0rd in the line containing FOPPASSWORD=passw0rd with a different password.

Change MeetMe password: passwd-meetme

Change Manager password: nano /etc/asterisk/manager.conf. Change the password under [admin] and navigate to /etc/amportal.conf and update the password there too, in the line AMPMGRPASS=amp111

Change ARI Password: nano -w /var/www/html/recordings/includes/main.conf.php. Look for where it says ARI_Password and change it.

Change SQL Password: mysqladmin -u asteriskuser -p password newpassword. It will prompt you for the existing password, which is amp109. You must update this new password in /etc/amportal.conf in the line of AMPDBPASS=amp109, towards the bottom of the page. You need to match that SQL password in the line password in /etc/asterisk/cdr_mysql.conf and dbpass in /etc/asterisk/res_mysql.conf

To use authtype=database:

1. Make sure you changed authtype to say AUTHTYPE=database

2. nano /etc/trixbox/httpdconf/trixbox.conf

3. scroll down, make sure this section is rem'd out with #:

#Password protect /var/www/html/admin
#
#AuthType Basic
#AuthName "Restricted Area"
#AuthUserFile /usr/local/apache/passwd/wwwpasswd
#Require user wwwadmin maint

4. ctrl + x to save and exit.

5. service httpd restart

6. login to freePBX with the username being admin and the password being admin. change this password, add/remove usernames by going to the Administrators section in freepbx

--

Joseph Ades
josephades1_at_gmail_dot_com
(212) 937-4299



jimlawrnc
Posts: 126
Member Since:
2007-06-26
Must have missed

Must have missed somewhere

FATAL ERROR
[nativecode=Access denied for user 'asteriskuser'@'localhost' (using password: YES)] ** mysql://asteriskuser:amp109@localhost/asterisk



jimlawrnc
Posts: 126
Member Since:
2007-06-26
Maybe its me but there seems

Maybe its me but there seems to be to many places for authentication in trixbox. Also once 1 thing is changed everything gets messed up permission wise. i undidd all of the above and can login with maint but writing changes to config files gives

Warning: copy(/etc/amportal.conf) [function.copy]: failed to open stream: Permission denied in /var/www/html/maint/modules/09_configedit/cls_phpconfig.php on line 315
Write failed!



jades
Posts: 2340
Member Since:
2006-11-26
What did you do before I

What did you do before I sent you the proper way to change passwords?

You mentioned you somehow changed the wwwadmin password? Tell e exactly what you did and let's try to undo that, as this might have messed it up

--

Joseph Ades
josephades1_at_gmail_dot_com
(212) 937-4299



jimlawrnc
Posts: 126
Member Since:
2007-06-26
i changed the passwd-amp

i changed the passwd-amp back to the amp109 password when running passwd-amp it changes thew password for wwwadmin

I may need to re install to clear this up. plus upgrade to the trixbox 2.4 your thoughts?



jades
Posts: 2340
Member Since:
2006-11-26
Oh. If you have trixbox 2.2.

Oh. If you have trixbox 2.2. you might as well upgrade to 2.4. It should be more stable, and now 2.6 is coming out soon and Kerry says it has much better fax support than it ever did before. And there will be an upgrade path from 2.4 to 2.6

2.4 will also detect new zaptel hardware if you ever decide to use that in the future.

--

Joseph Ades
josephades1_at_gmail_dot_com
(212) 937-4299



DavidKirchner
Posts: 28
Member Since:
2008-08-25
Trixbox 2.6 "PBX Settings" not authorized

Glad to find your post. I just started with trixbox, upgrade to latest ver, saw a message about needing to changing etc/amportal.conf AUTHTYPE=database. But I lost access to 'PBX Settings' untill I used your tip to rem out '#/var/www/html/admin' in nano /etc/trixbox/httpdconf/trixbox.conf.
Thanks, David Kirchner, MCSE

--

David Kirchner, MCSE



jades
Posts: 2340
Member Since:
2006-11-26
Good to hear it

Good to hear it worked!
Welcome to trixbox!

--

Joseph Ades
josephades1_at_gmail_dot_com
(212) 937-4299



seighalan
Posts: 8
Member Since:
2010-03-23
thanks ja133 for your kind

thanks ja133 for your kind of help. :)

--

free is to know that you have a different option



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.