ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Reset Admin Password on FreePBX from the Command Line

    IT Discussion
    freepbx security mysql
    2
    2
    11.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      So you lost your password to your FreePBX system and need reset it from the command line. You can do this pretty easily from the mysql client (or from a tool like phpMyAdmin) like so:

      mysql -D asterisk -e "UPDATE ampusers SET password_sha1='e1edd0771b6345f00b5557b98b2bde8fd66744c5' WHERE username='admin'"
      

      You need to change the username from "admin" to whatever you have set as your admin if this is not the name that you have used. Most people use "admin" by default. The command above will change this user's password to "iforgotmypassword". Don't keep this, just log in and change it once you have gotten this fixed.

      JaredBuschJ 1 Reply Last reply Reply Quote 2
      • JaredBuschJ
        JaredBusch @scottalanmiller
        last edited by

        @scottalanmiller said in Reset Admin Password on FreePBX from the Command Line:

        mysql -D asterisk -e "UPDATE ampusers SET password_sha1='e1edd0771b6345f00b5557b98b2bde8fd66744c5' WHERE username='admin'"

        Why on earth do you give an instruction with a hash in it?

        Why not use the MySQL SHA1() function?

        mysql -D asterisk -e "UPDATE ampusers SET password_sha1=SHA1('CHANGEME') WHERE username='admin'"
        
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post