export unauthorized
-
This server is a fresh ubu 22.04 with fog 1.5.10.41, but as I’m having trouble getting data into fog and it behaving, I’ve removed fog files, dropped sql dbase, and reinstalled fog numerous times.
-
On first install/config import the hosts and images appear, but the storage node info disappeared.
-
I get an unauthorized page when trying to export host and image CSVs.
-
Dropping failed sql dbase import and reinstalling fog brings back storage node info so I try manually entering the host and image info then exporting them for a “clean install,” but trying to export CSV gets an unauthorized page still.
I’ve tried every un/pw combo I can find
UN: root
PW: xxxDesc.: local user
UN: local_admin
PW: xxxDesc.: Fog storage nodes
UN: fogstorage
PW: [as found in config gui]Desc.: TFTP server
UN: fogproject
PW: [as found in config gui]Desc.: initialiazation
UN: fog
PW: passwordDesc.: wiki tip
UN: localhost
PW: [blank]Desc.: wiki tip
UN: local loopback
PW: [blank]Desc.: wiki tip
UN: localhost
PW: [local user pw?]Desc.: wiki tip
UN: local loopback
PW: [local user pw?]and while I’ve read this
https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG
I’m trying to use the gui.I’d love to be able to export a CVS from my newly installed server, but … what gives?
-
-
-
I believe the problem you are facing is the way the new export.php (https://github.com/FOGProject/fogproject/compare/1.5.10...1.5.10.41?diff=split&w=#diff-ff9e620c45c9b82140dffca512e6417f03cc4972a20a6659a4f4a248ffa56082) validates the export.
I have the same problem on a newly installed server OS: Ubuntu 22.04, FOG Server: 1.5.10.48. I changed the if statement with
echo $currentUser; echo '<br>'; echo strtolower($_SERVER['HTTP_X_REQUESTED_WITH']); echo '<br>'; echo _('Unauthorized'); exit;
on export.php and as it shows
User ID: 1 Name: fog Unauthorized
the blank line is the empty variable which then forces the Unauthorized exit.
-
Thanks for that. I get the same result in my slightly newer version.
I updated the post to show my OS and version. -
@geardog What are the steps (as verbose you can give) that you’re taking to try to export?
-
Yup, I’m experiencing the same issue. New FOG install 1.5.10.74. Any attempt to export hosts or images to a CSV file results in a blank page with the word “Unauthorized”. Importing host and image CSV files does work though. Only exporting doesn’t work.
-
-
tested on staging server and it works.
OS: Ubuntu 22.04
FOG Server: 1.5.10.1577Export of images and hosts now is successful
-
-
@AUTH-IT-Center Thanks for letting me know.
I have created a class method that will do the authorization checks as well (meaning we call one line of code in scripts that need authorization check and its consistent across requests. So if we do have to tweak it later, we only have to adjust it in the one spot.
Thanks @geardog @fogcloud @AUTH-IT-Center For letting us know.
-
@Tom-Elliott Thank you
Took me a while to circle back to this, but it’s nice to have it working as expected.