Accidently locked out of WebGUI
-
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?
-
replace the corrupted logo back with the original ?
https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/logo.svgit's never a good idea to start messing with source when using a production machine
-
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. -
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
-
@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
-
Yeah well i'm facepalming here too - it was stupid all right.
I'll see if I can connect to console somehow. -
@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 .oldI 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.
-
@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 ;) -
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
-
You could also use 'fetch' which is included for future reference.