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

    Is it possible to remove the FOG Quick image password?

    Scheduled Pinned Locked Moved
    FOG Problems
    9
    35
    16.5k
    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
      Darkzion
      last edited by

      Hi.
      We recently discovered the fog project and its really a great tool to handle imaging computers etc.
      But I’ve been searching up and down for a way to remove the password dialog that pops up when you click “quick image” after booting. Is there a way to remove this password dialog ?

      I know the password box is there for a reason 😉 But for our purpose it would be best if it was removed since everyone who will be using this can be trusted.

      We are currently using developer branch 1.3.0

      Best Regards

      1 Reply Last reply Reply Quote 0
      • Joseph HalesJ
        Joseph Hales Testers
        last edited by

        Yes it’s listed as one of the examples on how to edit the boot menu on the main FOG wiki.

        RTFM

        1 Reply Last reply Reply Quote 0
        • Joseph HalesJ
          Joseph Hales Testers
          last edited by

          [SIZE=4][B][FONT=sans-serif][COLOR=#000000]From [url]http://fogproject.org/wiki/index.php/Modifying_the_Init_Image[/url][/COLOR][/FONT][/B][/SIZE]

          [SIZE=4][B][FONT=sans-serif][COLOR=#000000] [/COLOR][/FONT][/B][/SIZE]

          [SIZE=4][B][FONT=sans-serif][COLOR=#000000]Remove Authentication from Quick Image[/COLOR][/FONT][/B][/SIZE]

          [FONT=sans-serif][COLOR=#000000]This example will show how to automatically authenticate users when they select Quick Image. If you are happy to allow anybody to deploy an image to a hardrive this is for you.[/COLOR][/FONT]
          [COLOR=#000000][FONT=monospace]cd /tftpboot/fog/images
          gunzip init.gz
          mkdir initmountdir
          mount -o loop init initmountdir
          cd /tftpboot/fog/images/initmountdir/bin/[/FONT][/COLOR]
          [FONT=sans-serif][COLOR=#000000]Edit fog.quickimage
          Comment out the followig lines by putting a # in front[/COLOR][/FONT]
          [COLOR=#000000][FONT=monospace] #echo " Enter a valid FOG username and password.";
          #echo “”;
          #echo -n " Username: ";
          #read username;
          #echo “”
          #echo -n " Password: ";
          #stty -echo
          #read password;
          #stty echo;
          #echo “”;
          #echo “”[/FONT][/COLOR]
          [FONT=sans-serif][COLOR=#000000]Replace with:[/COLOR][/FONT]
          [COLOR=#000000][FONT=monospace] username=“a valid username”
          password=“a valid password”;[/FONT][/COLOR]
          [FONT=sans-serif][COLOR=#000000]Save the modification[/COLOR][/FONT]
          [COLOR=#000000][FONT=monospace]cd …/…
          umount initmountdir/
          rmdir initmountdir
          gzip init[/FONT][/COLOR]
          [FONT=sans-serif][COLOR=#000000]You are done and now users can image without the need for a username and a password.[/COLOR][/FONT]

          RTFM

          L 1 Reply Last reply Reply Quote 0
          • JunkhackerJ
            Junkhacker Developer
            last edited by

            i should point out that the example is a bit old and is listing the wrong location to find the init file.
            it is now located in the web services directory ( /var/www on ubuntu) in /fog/services/ipxe/ and there will be 2 separate versions, init.xz and init_32.xz, for 64 and 32 bit respectively.

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

            1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott
              last edited by

              I should point out that quick image is not performed (at all) from the init any more.

              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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              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

              1 Reply Last reply Reply Quote 0
              • Joseph HalesJ
                Joseph Hales Testers
                last edited by

                I don’t have edit access on the wiki maybe one of you can revise the entry.

                RTFM

                1 Reply Last reply Reply Quote 0
                • D
                  Darkzion
                  last edited by

                  Thanks for all the answers guys. I found the files and did the procedure above. unfortunately it did not work.
                  Im guessing it has something to do with what Tom Elliot wrote.

                  Tom: Do you know where quick image is performed from ?

                  Thanks Guys

                  1 Reply Last reply Reply Quote 0
                  • JunkhackerJ
                    Junkhacker Developer
                    last edited by

                    for any host that is registered, quick imaging is now done by scheduling a task on the server side. i hadn’t looked at the scripting and assumed it would pass the login info to the fog server components to schedule a task, but this is old code from the way it was done before.

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

                    1 Reply Last reply Reply Quote 0
                    • D
                      Darkzion
                      last edited by

                      Thx guys.
                      But it seems that we have still not managed to find a solution to this problem.
                      We have done all above but the password screen on quick image is still popping up.
                      Any other suggestions ?

                      We found a “BootMenu.class.php” file and other php files but we havent found any way to disable the password screen yet.

                      1 Reply Last reply Reply Quote 0
                      • Tom ElliottT
                        Tom Elliott
                        last edited by

                        This is actually really simple to accomplish.

                        In the file that you found (/var/www/fog/lib/fog/BootMenu.class.php:

                        Look for the four lines:
                        [php] else if ($_REQUEST[‘qihost’] && !$_REQUEST[‘imageID’])
                        $this->setTasking();
                        else if ($_REQUEST[‘qihost’] && $_REQUEST[‘imageID’])
                        $this->setTasking($_REQUEST[‘imageID’]);[/php

                        They are at about line numbers: 655 thru 658

                        Place the lines in the else statement at line 677? right after the curly brack. Remove the first else in the statement so it’ll look like:
                        [php] if ($_REQUEST[‘qihost’] && !$_REQUEST[‘imageID’])
                        $this->setTasking();
                        else if ($_REQUEST[‘qihost’] && $_REQUEST[‘imageID’])
                        $this->setTasking($_REQUEST[‘imageID’]);[/php]

                        This won’t, by itself, keep the system from requesting a username and password, but all you should have to do is press enter.

                        With that you still have to select which image (if host has image already, it defaults to point at that hosts image, but you can choose any you please.)

                        An even better method would be to just remove the:
                        [code]login[/code]
                        from the fog.quickimage database entry.

                        Replace the lines
                        [code]param username ${username}
                        param password ${password}[/code]
                        With something like:
                        [code]param username fogusername
                        param password fogpassword[/code]
                        In the fog.quickimage database entry.

                        This should keep it from asking about a username and password as well as allow BootMenu.class.php to remain un touched.

                        I’ve decided, based on the multiple people wanting to customize the main boot items directly even, to re-enable editing so you can do this from the GUI now as well. So you don’t have to edit a file and you can make your changes
                        as needed.

                        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                        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

                        1 Reply Last reply Reply Quote 1
                        • D
                          Darkzion
                          last edited by

                          Thank you very much Tom.
                          We updated out build with the newest release on the dev branch and as you said, its now possible to edit this from the GUI.
                          We did as you said and changed the param and removed “login”. And now it skips the login screen and lets us select the image right after clicking quick image 🙂

                          But unfortunately it seems like the password autentication might still be required somewhere in the code.
                          Because as soon as we click a image that we want to have installed. It jumps us back to the “fog menu” .
                          With no error message other than a quick “returning to menu”.

                          Best regards

                          1 Reply Last reply Reply Quote 0
                          • Tom ElliottT
                            Tom Elliott
                            last edited by

                            Do you have anything in your apache error logs?

                            A good way to get the most out of the information:

                            Start your client and get it “ready” to select an image to push but don’t choose an image yet.

                            Open a terminal/ssh to your fog server. Run:
                            [code]sudo tail -100f /var/log/apache2/error.log[/code]

                            Press enter on the the image you want to push to the client.

                            Press CTRL+C on the ssh terminal. The last few lines of the error log should give you where the problem is.

                            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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                            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

                            1 Reply Last reply Reply Quote 0
                            • D
                              Darkzion
                              last edited by

                              [quote=“Tom Elliott, post: 42476, member: 7271”]Do you have anything in your apache error logs?

                              [/quote]

                              Thank again Tom.
                              According to the apache logs i keep getting this >

                              [Fri Feb 20 16:55:48.371529 2015] [:error] [pid 2376] [client 172.16.200.14:33459] PHP Warning: array_unique() expects parameter 1 to be array, null given in /var/www/fog/lib/fog/HostManager.class.php on line 8

                              Every time i click “quick image” from the main menu, and every time i click on a image on the next menu.But dont think thats related. This only happens when i havent registered the host. If i register it. Then i dont get any error message at all in the error log. But it still kicks me back to the main menu when i select an image

                              1 Reply Last reply Reply Quote 0
                              • Tom ElliottT
                                Tom Elliott
                                last edited by

                                I’ve found a solution:

                                For the fog.quickimage menu item
                                before the params setting put:
                                [code]set username fogguiusernamehere
                                set password fogguipasswordhere[/code]

                                Reset the param username and param password back to:
                                [code]param username ${username}
                                param password ${password}[/code]

                                This should work at least in my testing it has.

                                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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                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

                                1 Reply Last reply Reply Quote 0
                                • D
                                  Darkzion
                                  last edited by

                                  Thanks again Tom.
                                  Im sorry for the late reply. Been out of the country.
                                  I just wanted to say that the last solution you gave fixed it for us.
                                  Thank you so much for your help 🙂

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    Mikael
                                    last edited by

                                    For the extra clarity, this worked for me. Edited /var/www/fog/lib/fog/BootMenu.class.php, the rows just below "…$option == ‘fog.quickimage’)

                                    //              print "login\n";
                                    				print "set username username\n";
                                    				print "set password password\n";
                                    

                                    /Thanks!

                                    1 Reply Last reply Reply Quote 1
                                    • L
                                      lebrun78
                                      last edited by

                                      is it always available on 1.3.3 version ?

                                      Fog Version: Fog 1.5.10
                                      Server OS: AlmaLinux release 8.8

                                      Tom ElliottT 1 Reply Last reply Reply Quote 0
                                      • Tom ElliottT
                                        Tom Elliott @lebrun78
                                        last edited by

                                        @lebrun78 Is what always available?

                                        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                        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

                                        L 1 Reply Last reply Reply Quote 0
                                        • L
                                          lebrun78 @Tom Elliott
                                          last edited by

                                          @Tom-Elliott
                                          Is the procedure described above?

                                          the file fog.quickimage doesn’t exist on base 1.3.3.
                                          Should I add it ?

                                          Fog Version: Fog 1.5.10
                                          Server OS: AlmaLinux release 8.8

                                          Tom ElliottT 1 Reply Last reply Reply Quote 0
                                          • Tom ElliottT
                                            Tom Elliott @lebrun78
                                            last edited by

                                            @lebrun78 What procedure?

                                            iPXE menu items have never been “files” either.

                                            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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                            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

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            249

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project