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

    Install SSH in init.gz?

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    11
    3.2k
    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.
    • TreyBentleyT
      TreyBentley
      last edited by TreyBentley

      We’re still on Fog 0.32 and want to have units automatically approved in PacketFence when we register a system.

      I have found how to do this via their pfcmd script and was able to successfully run tests via ssh from the standard Ubuntu shell on the Fog Server. Now, I need to figure out how to “install” ssh capabilities in the init.gz file. I know how to extract the contents and repackage them, that’s not an issue. My issue is that I simply don’t know (nor can I Google-find) which files, from where, should go where.

      I tried copying “/usr/bin/ssh” to “initmountdir/usr/bin/ssh” as well as a few /etc/ssh, /lib, and /lib64 files and their symlinks. But, alas, I still get error messages as if there’s some prerequisite missing. Here’s the error message at the time of this writing:

      ssh_err.png

      So… does anyone know how properly inject ssh into init.gz?

      TIA

      Wayne WorkmanW 1 Reply Last reply Reply Quote 0
      • Wayne WorkmanW
        Wayne Workman
        last edited by

        I’m almost certain that SSH is built into newer versions of FOG already. Have you considered upgrading? .32 is aging and will support fewer and fewer systems as time passes.

        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!
        Daily Clean Installation Results:
        https://fogtesting.fogproject.us/
        FOG Reporting:
        https://fog-external-reporting-results.fogproject.us/

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

          @Wayne-Workman “almost certain” can be changed to IT IS CERTAIN! I use it all the time now especially when I need to test updated code, but without having to recompile the init’s every time I want to test the updates.

          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

          Wayne WorkmanW 1 Reply Last reply Reply Quote 1
          • Wayne WorkmanW
            Wayne Workman @Tom Elliott
            last edited by

            @Tom-Elliott said:

            @Wayne-Workman “almost certain” can be changed to IT IS CERTAIN! I use it all the time now especially when I need to test updated code, but without having to recompile the init’s every time I want to test the updates.

            Lol… I wasn’t sure if it was just in the dev version or if it was in 1.2.0 too.

            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!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

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

              @Wayne-Workman Ah, no it is not in 1.2.0.

              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
              • Wayne WorkmanW
                Wayne Workman @TreyBentley
                last edited by

                @TreyBentley Ok then Mr. Bently, for this to be done for you, please first export your DB as a backup (or snapshot it if it’s a VM).
                Examples for how to do this via CLI can be found here. https://wiki.fogproject.org/wiki/index.php/Troubleshoot_MySQL
                Then install 1.2.0 and get that working soundly.
                Export your DB again like this:
                FOG Configuration -> Configuration Save -> Export
                Host Management -> Export Hosts -> Export

                Now, to move to trunk - you may or may not need to upgrade to a newer operating system… You haven’t told us what you are using.
                But instructions on upgrading to FOG Trunk can be found here: https://wiki.fogproject.org/wiki/index.php/Upgrade_to_trunk

                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!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                1 Reply Last reply Reply Quote 0
                • TreyBentleyT
                  TreyBentley
                  last edited by

                  I realized after I posted that a recommendation would probably be to update. However, due to some other rather heavy modifications to the PXE menu, other host reg questions, and even a handful or two of the php files, it would be counter-productive to take away so much automation that I’ve built up over the years. Our techs would be thrown back into manual processes until I could modify the new build to be similar to the current.

                  Anyway, I gave up on trying to inject ssh into the init.gz file, and instead made a wget call after host reg with post-data to a php file that could then in turn run the ssh commands I needed. ^_^ Go me.

                  Thanks for the time y’all took to reply, though! I appreciate it!

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

                    @TreyBentley If you would like help to figure out what customizations you will still need to do to get to trunk, we are available.

                    There is a LOT of differences between 1.2 and trunk, and that much more so between 0.32 and trunk.

                    Many of the things people have been requesting, and I’m guessing some of your own customizational needs, have been addressed. Of course I can’t do everything for everybody but don’t think we won’t try to help you out.

                    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
                    • Tom ElliottT
                      Tom Elliott
                      last edited by

                      I’m solving this thread as installing ssh in the init.gz is possible, but would require the user to rebuild a custom init.gz. Just inserting the needed files isn’t enough as components of the programs capabilities need to be built specifically to the init environment. It is not a simple copypasta operation.

                      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

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

                        @Tom-Elliott wouldn’t it be possible, however, to download the latest trunk with SSH installed already, decompress, replace the new fog scripts with the versions from 0.32, and re-compress?

                        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

                          @Junkhacker Technically yes.

                          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 / 1
                          • First post
                            Last post

                          192

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project