Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Accidently locked out of WebGUI

    General pfSense Questions
    4
    10
    578
    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.
    • R
      Raka74 last edited by

      Hi,

      I accidentally uploaded a wrong logo image and now all the webui shows is

      Parse error: syntax error, unexpected 'version' (T_STRING) in /usr/local/www/logo.svg on line 1

      Any suggestions to get back in?

      1 Reply Last reply Reply Quote 0
      • H
        heper last edited by

        replace the corrupted logo back with the original ?
        https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/logo.svg

        it's never a good idea to start messing with source when using a production machine

        1 Reply Last reply Reply Quote 0
        • R
          Raka74 last edited by

          I would do that if I could, I uploaded the corrupt one via the command option in the GUI.
          I realise now I shouldn't have done this without leaving another way in open.

          Gertjan 1 Reply Last reply Reply Quote 0
          • H
            heper last edited by heper

            ssh ? or directly from vga or serial console

            something like below might do the trick

            cd /usr/local/www
            wget https://raw.githubusercontent.com/pfsense/pfsense/master/src/usr/local/www/logo.svg
            
            1 Reply Last reply Reply Quote 0
            • Gertjan
              Gertjan @Raka74 last edited by Gertjan

              @Raka74 said in Accidently locked out of WebGUI:

              command option in the GUI

              ?? I wouldn't even run "ls"' in this thing.
              The GUI - like Windows ** - is nice when everything works fine.

              The console access (can also be SSH access) was not created to have a spare access in mind, but it fulfils perfectly this need.

              Btw : pretty unthinkable that you actually started modifying source 'html' or PHP pages without assuring your back == using a console access. Just one typo and you're out ....

              ** and any other device with a GUI type access :)

              edit :

              cd /usr/local/www
              wget https://raw.githubusercontent.com/pfsense/pfsense/master/src/usr/local/www/logo.svg
              

              This only works when execued from console or SSH access.
              Also, I didin't manage to install 'wget' /)

              [2.4.4-RELEASE][admin@pfsense.brit-hotel-fumel.net]/usr/local/www: pkg install  wget
              Updating pfSense-core repository catalogue...
              pfSense-core repository is up to date.
              Updating pfSense repository catalogue...
              pfSense repository is up to date.
              All repositories are up to date.
              pkg: No packages available to install matching 'wget' have been found in the repositories
              

              No "help me" PM's please. Use the forum.

              R H 2 Replies Last reply Reply Quote 0
              • R
                Raka74 last edited by

                Yeah well i'm facepalming here too - it was stupid all right.
                I'll see if I can connect to console somehow.

                1 Reply Last reply Reply Quote 0
                • R
                  Raka74 @Gertjan last edited by Raka74

                  @Gertjan said in Accidently locked out of WebGUI:

                  @Raka74 said in Accidently locked out of WebGUI:

                  command option in the GUI

                  ?? I wouldn't even run "ls"' in this thing.
                  The GUI - like Windows ** - is nice when everything works fine.

                  The console access (can also be SSH access) was not created to have a spare access in mind, but it fulfils perfectly this need.

                  Btw : pretty unthinkable that you actually started modifying source 'html' or PHP pages without assuring your back == using a console access. Just one typo and you're out ....

                  ** and any other device with a GUI type access :)

                  edit :

                  If I manage to connect with console don't have to upload another file I think, if the file doesn't exist the page will load.
                  It did when I renamed the original .svg to .old

                  I didnt expect replacing a picture to have this much impact :(

                  But I'm not holding my breath - I haven't looked, but not even sure if the box has a serial port , and if so I have to find a usb->serial cable somewhere.

                  Thanks for the suggestions anyway.

                  Gertjan 1 Reply Last reply Reply Quote 0
                  • Gertjan
                    Gertjan @Raka74 last edited by

                    @Raka74 said in Accidently locked out of WebGUI:

                    I didnt expect replacing a picture to have this much impact :(

                    Probably because "logo.svg" isn't something as a "binary" image file, but something included in a style sheet.
                    Open the file ;)

                    No "help me" PM's please. Use the forum.

                    1 Reply Last reply Reply Quote 0
                    • H
                      heper @Gertjan last edited by

                      This only works when execued from console or SSH access.
                      Also, I didin't manage to install 'wget' /)

                      [2.4.4-RELEASE][admin@pfsense.brit-hotel-fumel.net]/usr/local/www: pkg install  wget
                      Updating pfSense-core repository catalogue...
                      pfSense-core repository is up to date.
                      Updating pfSense repository catalogue...
                      pfSense repository is up to date.
                      All repositories are up to date.
                      pkg: No packages available to install matching 'wget' have been found in the repositories
                      

                      oh well;: curl is:

                      curl https://raw.githubusercontent.com/pfsense/pfsense/master/src/usr/local/www/logo.svg --output logo.svg
                      
                      1 Reply Last reply Reply Quote 1
                      • stephenw10
                        stephenw10 Netgate Administrator last edited by

                        You could also use 'fetch' which is included for future reference.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post