• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Modify the ipxe Advanced login menu

Scheduled Pinned Locked Moved
FOG Problems
4
11
1.6k
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.
  • D
    DBCountMan
    last edited by May 5, 2022, 2:59 PM

    We have it set up where during the ipxe boot process, we are prompted to press ESC to load the FOG menu, otherwise the PC will boot to the first drive. Once we press ESC we are greeted with this login screen. I want to know where the source is for this menu so I can add some text for some end users that may accidentally land at this page. Like “echo Press CTRL+ALT+DEL to exit” or “reboot”.
    Screenshot from 2022-05-05 10-56-29.png

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by May 5, 2022, 6:41 PM

      @brakcounty Unfortunately it’s not as easy to add text to this screen because it’s the plain login command iPXE provides: https://ipxe.org/cmd/login

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      D 1 Reply Last reply May 5, 2022, 7:41 PM Reply Quote 0
      • D
        DBCountMan @Sebastian Roth
        last edited by May 5, 2022, 7:41 PM

        @sebastian-roth It seems like I can put an echo command somewhere

          login
          echo Hello ${username}
        

        But I don’t know where. The /var/www/fog/service/ipxe/boot.php file is what loads this menu right?

        1 Reply Last reply Reply Quote 0
        • J
          Junkhacker Developer
          last edited by May 5, 2022, 9:36 PM

          @brakcounty that would not alter that screen. that would display “Hello <contents of first field>” on the next screen after hitting enter

          signature:
          Junkhacker
          We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

          D 1 Reply Last reply May 6, 2022, 1:39 PM Reply Quote 0
          • D
            DBCountMan @Junkhacker
            last edited by DBCountMan May 6, 2022, 8:10 AM May 6, 2022, 1:39 PM

            @junkhacker Ah okay. So the text on that screen are baked into a file somewhere right? The ipxe.efi image?

            G 1 Reply Last reply May 6, 2022, 2:51 PM Reply Quote 0
            • G
              george1421 Moderator @DBCountMan
              last edited by george1421 May 6, 2022, 8:52 AM May 6, 2022, 2:51 PM

              @brakcounty Understand I’m not a programmer so the info I might give you could be wrong. But what you see there on the screen is being displayed by ipxe with its logon command. So iPXE has control of the screen at this moment.

              This is the ipxe script that is executing to create the screen above.

              #!ipxe
              clear username
              clear password
              login
              params
              param username ${username}
              param password ${password}
              chain ${boot-url}/service/ipxe/advanced.php##params
              

              The login command instructs iPXE to display that screen. It may not be possible to display anything on this screen from the FOG perspective.

              To test to see if its possible, I might adjust the above script as

              clear username
              clear password
              echo FOG is Cool
              login
              params
              param username ${username}
              param password ${password}
              chain ${boot-url}/service/ipxe/advanced.php##params
              

              Create a new FOG iPXE menu item and add that (above script) in the parameter block. When you pxe boot and select that test menu item does it display FOG is Cool on the login page or does FOG is Cool get erased by the login page?

              If it works and the FOG is Cool text is displayed I’ll give you instructions on how to tweak the FOG code to is added.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              D 1 Reply Last reply May 6, 2022, 4:03 PM Reply Quote 0
              • D
                DBCountMan @george1421
                last edited by DBCountMan May 6, 2022, 10:04 AM May 6, 2022, 4:03 PM

                @george1421 No dice. Didn’t see the echo’d text. This suggestion might complicate things, but what if before loading that login menu, we load another custom menu, that warns the user that “This menu is for IT only, if you are not authorized, please wait 5 seconds until Windows boots…” then from there chain the login page. That’s a stretch I know, but we are beginning to explore making FOG accessible from other VLANs and departments to make our lives easier. Better than bringing a drive or a whole PC back to the shop to reimage it. I may be overthinking this, because even some of my collegues miss the “press ESC to load FOG” prompt during the initial PXE boot, so this might not even be necessary as most people will overlook it.

                G 1 Reply Last reply May 6, 2022, 5:03 PM Reply Quote 0
                • G
                  george1421 Moderator @DBCountMan
                  last edited by May 6, 2022, 5:03 PM

                  @brakcounty I think you are close to a solution.

                  Simply in fog set your advanced menu to an intro menu. That intro menu will say exactly that this page is for IT only if they wait it will then boot into the OS, if they make the menu selection for IT only they will be prompted to login, the login will then get them to the real ipxe advanced menu.

                  So if you want to reverse engineer how the FOG menus work (will be a good template for you to start with) just call the ipxe menu with a browser http://<fog_server_ip>/fog/service/boot.php?mac=00:00:00:00:00:00 That will send the text behind the ipxe menu to your browser.

                  With that said I just had a new/different idea. Lets create a new iPXE menu entry, it will function as the gateway into the Advanced menu. (understand I did not debug this only glued the bits together.

                  clear username
                  clear password
                  prompt --key y --timeout 5000 For IT Only, press 'y' to enter the secret IT cave && login || goto fog.local
                  params
                  param username ${username}
                  param password ${password}
                  chain ${boot-url}/service/ipxe/advanced.php##params
                  

                  This will display a prompt for 5 seconds, if the user presses y then they will be prompted to login otherwise it will exit to boot to the hard drive.

                  You could also chain to a ipxe script on the fog server and just not mess with the advanced option in fog. The advanced menu basically puts the login front end in front of the ipxe menu you added to the advanced field in fog.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  D 1 Reply Last reply May 9, 2022, 2:44 PM Reply Quote 0
                  • D
                    DBCountMan @george1421
                    last edited by May 9, 2022, 2:44 PM

                    @george1421 said in Modify the ipxe Advanced login menu:

                    clear username
                    clear password
                    prompt --key y --timeout 5000 For IT Only, press ‘y’ to enter the secret IT cave && login || goto fog.local
                    params
                    param username ${username}
                    param password ${password}
                    chain ${boot-url}/service/ipxe/advanced.php##params

                    This ipxe menu entry worked, but only after I logged in via that blue advanced login page. Its alright, there is also a timeout on that blue login, so if an end-user accidentally goes there, they’ll just call our helpdesk, and we handle it from there moving forward.

                    G 1 Reply Last reply May 9, 2022, 3:45 PM Reply Quote 0
                    • G
                      george1421 Moderator @DBCountMan
                      last edited by May 9, 2022, 3:45 PM

                      @brakcounty In the web configuration disable the advanced menu login setting. You are now doing this via your custom menu. BUT its also possible that it might just accept any value for the user ID and password.

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                      D 1 Reply Last reply May 9, 2022, 4:52 PM Reply Quote 0
                      • D
                        DBCountMan @george1421
                        last edited by May 9, 2022, 4:52 PM

                        @george1421 Right. I won’t mess with it since we have it set up and working.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        1 / 1
                        • First post
                          7/11
                          Last post

                        216

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project