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

    Quick host registration is registering my computers with the Mac address as the hostname

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    3
    8
    1.3k
    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
      D_quiros
      last edited by

      Hello all, I am installing a new fog server in my company. The old one that we used to have, registered every computer with the hostname that I want: "SITECODE-{SYSSERIAL} but it is not working on the new version. Can someone now how to change that?

      Thanks in advance

      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by

        Your old version must have been a modified version of 0.29-0.30. That feature never made it into the mainstream code base. That feature is not currently available. (I also asked the same question so many years ago)

        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!

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

          I’ve not added any special strings as it actually adds quite a bit of complexity to the overall workflow.

          While it’s not “overly” hard to add such a feature, I think this is something more in line with a user being able to edit and figure out.

          First, you have to understand, you have to detect your “special” strings and replace them with the corresponding value. During Quick Registration, we haven’t quite gotten the inventory of the host yet, until after the host has been registered. It shouldn’t be too hard to add, but again it’s not a simple thing either.

          And where do we “stop”. For example, what strings should we allow, vs, not allow?

          The file you can edit, if you’d like to try adding this feature again, is located (with 1.4.4 at least) /var/www/fog/lib/reg-task/registration.class.php There’s two methods, _quickRegAuto and _quickReg, you’d want to modify the _quickRegAuto specifically.

          You’ll notice that inventory isn’t taken into account here, and therefor using the inventory data for the hostname would have to be done within the init’s.

          In particular, the init file /bin/fog.auto.reg would need to be modified after the inventory line.

          I’m bringing this to your attention only because FOG has changed quite a bit since 0.29/0.3x days and while this feature may have been there in the past, we have tried to make things much more manageable in general. This means some features from olden times may have been removed due to the complexity involved.

          Hopefully you understand.

          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

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

            I need to add, that these “special” strings were a component of the QUICK_REG_AUTO_POP feature of fog, which from what I’m hearing here sounds like is not enabled currently. This can be found in FOG Configuration Page->FOG Settings->Quick Registration

            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

            george1421G 1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @Tom Elliott
              last edited by

              @tom-elliott Is there a hook that we could use to add that feature back in? Ideally once FOG sets the host name we could hook in and rename what fog named by default. That way a plugin could be used? (asking without knowing much about what I’m saying).

              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!

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

                @george1421 yes but it still requires some intervention from the inits making the plugin idea possible but not as simple. The hook would be HOST_REGISTER which again happens before inventory data has been captured.

                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

                george1421G 1 Reply Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @Tom Elliott
                  last edited by george1421

                  @tom-elliott I looked at this a few years ago because I have the original code from the 0.3x days. I was quickly over my head in trying to sort it out.

                  How hard would it be for the developers to add another hook loop after the inventory has been committed during inventory process? Something like custom_host_name? Then I think the inits wouldn’t need to be touched since it would all be done in the fog backend. Then anyone with the motivation could write a host renaming plugin. The only thing the plugin would need access to outside of the host object would be the fog configuration infor for the auto naming field.

                  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!

                  1 Reply Last reply Reply Quote 0
                  • D
                    D_quiros @Tom Elliott
                    last edited by

                    @tom-elliott said in Quick host registration is registering my computers with the Mac address as the hostname:

                    I’ve not added any special strings as it actually adds quite a bit of complexity to the overall workflow.

                    While it’s not “overly” hard to add such a feature, I think this is something more in line with a user being able to edit and figure out.

                    First, you have to understand, you have to detect your “special” strings and replace them with the corresponding value. During Quick Registration, we haven’t quite gotten the inventory of the host yet, until after the host has been registered. It shouldn’t be too hard to add, but again it’s not a simple thing either.

                    And where do we “stop”. For example, what strings should we allow, vs, not allow?

                    The file you can edit, if you’d like to try adding this feature again, is located (with 1.4.4 at least) /var/www/fog/lib/reg-task/registration.class.php There’s two methods, _quickRegAuto and _quickReg, you’d want to modify the _quickRegAuto specifically.

                    You’ll notice that inventory isn’t taken into account here, and therefor using the inventory data for the hostname would have to be done within the init’s.

                    In particular, the init file /bin/fog.auto.reg would need to be modified after the inventory line.

                    I’m bringing this to your attention only because FOG has changed quite a bit since 0.29/0.3x days and while this feature may have been there in the past, we have tried to make things much more manageable in general. This means some features from olden times may have been removed due to the complexity involved.

                    Hopefully you understand.

                    @tom-elliott I understood most of the things that you said, but I am not sure what strings of the code should I have to change. Can you help me with that?

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

                    168

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project