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

    HostnameChanger Issue

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    8
    1.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.
    • J
      jtappen
      last edited by Sebastian Roth

      We DO NOT use Fog to join domain, however we use it to rename the PC to what we register the host as…

      Our process is this:

      Network boot, and choose “Full registration” we enter the Name we want the PC to be, then choose the image and etc… after the registration finishes and it is set to deploy the image, we network boot again, and the image is deployed…

      Now, during our 1st login of the administrator account we get a few things configured via the SetupComplete.cmd as well as a .bat file with the ending result being the Fog service being enabled, and the PC getting rebooted…

      The PC then auto logins in to windows, in the past the PC would automatically reboot and the PC would get the name changed via FOG client…

      Seems that if the check box is not checked under the individual Host called “Name Change/AD Join Forced reboot?” listed under the Active Directory section of the Host… the Fog client gives this error in the log:

      --------------------------------HostnameChanger-------------------------------
      ------------------------------------------------------------------------------
       10/9/2020 9:24:59 AM Client-Info Client Version: 0.12.0
       10/9/2020 9:24:59 AM Client-Info Client OS:      Windows
       10/9/2020 9:24:59 AM Client-Info Server Version: 1.5.9
       10/9/2020 9:24:59 AM Middleware::Response Success
       10/9/2020 9:24:59 AM HostnameChanger Users still logged in and enforce is disabled, delaying any further actions
      

      However if I manually check this check box “Name Change/AD Join Forced reboot?” within the Host Active Directory settings the PC reboots and gets renamed etc…

      How can this setting be checked by default when a Host is registered?

      I see a setting under “Fog Settings” in the “Active Directory Defaults”
      named “ENFORCE HOST CHANGES” and it is checked… as well as under “Fog Client - Hostname Changer” a setting “CLIENT HOSTNAMECHANGER ENABLED” that is also checked…

      As well as “CLIENT TASKREBOOT ENABLED” and “TASK FORCE REBOOT” under “FOG Client - task Reboot” also being checked…

      But the setting under the individual Host, in the Active Directory section named “Name Change/AD Join Forced reboot?” is NOT checked by default… and this is what stops the PC from being renamed if the computer has a user logged in…

      Does anyone know how to set the “Checked” as default on new Host registration??

      Thanks

      Jason

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @jtappen While I have not looked into this yet I can imagine this being a bug somewhere in the code. From what you described to far it looks like the “Active Directory Defaults” are not making it through. We’ll take a look at this.

        Which version of FOG do you currently use?

        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

        J 1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Sebastian Roth

          @darkxeno said in HostnameChanger Issue:

          Error multiple hosts returned for list of mac addresses

          This is the issue you have and it’s very different from what was initially asked in this topic. Please don’t hijack other peoples topics but open you own new one and post details there. If you like we can move the information posted here over the the new topic or you can just copy&paste the text over - as you like.

          Edit: I just remembered you had a topic opened but deleted it. So I just re-opened it and moved all the things over: https://forums.fogproject.org/topic/14827/unable-to-rename-join-error-multiple-hosts-returned-for-list-of-mac-addresses

          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
          • S
            Sebastian Roth Moderator
            last edited by Sebastian Roth

            @jtappen Seems like you are using FOG 1.5.9 from the fog-client log you posted. I just tested a full client registration through PXE and it got the “Name Change/AD Join Forced reboot?” checked just fine.

            The only difference I see so far is that I did not let it do a deploy directly and I don’t have the fog-client installed on that test setup so I can’t actually see if it would work. But in the host settings in the web UI I see the field being checked and I would suspect it to work.

            So to me it seems as there is no bug and it works as expected. Can you see anything I might be doing different than you do?

            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
            • J
              jtappen @Sebastian Roth
              last edited by

              @Sebastian-Roth
              Thanks for the reply… sorry I have not responded until now…
              Yes we are using 1.5.9

              When we do a full registry of a new device through the fog network boot, then if I go in and look at the settings for that device the check box for Name Change/AD Join Force reboot is NOT checked…
              And I have no idea what needs to be adjusted within the fog configuration to make this check box be checked by default on ALL new registered devices…

              18957893-ba74-4fab-99d6-7c74feadbcda-image.png

              Any further info would be appreciated

              Jason

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @jtappen The picture you posted, is this in Hosts -> edit one host’s settings -> Active Directory or in Groups -> edit group settings -> Active Directory?

                If it’s the host’s settings then we can start digging deeper by looking into the database:

                shell> mysql -u fogmaster -p
                Password:
                ...
                mysql> use fog;
                ...
                mysql> SELECT hostName,hostEnforce FROM hosts WHERE hostName LIKE '%newhostname%';
                ...
                mysql> SELECT settingValue FROM globalSettings WHERE settingKey LIKE '%FOG_ENFORCE_HOST_CHANGES%';
                ...
                mysql> quit
                

                The password for the fogmaster database user is found in /var/www/html/fog/lib/fog/config.class.php. Instead of newhostname in the SQL query put in the name of the host you just registered - make sure the case is correct! Post output of the commands here in the forum if you need further help.

                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
                • R
                  rodluz Developer
                  last edited by

                  @Sebastian-Roth I know this thread is a bit old, but my question is exactly this thread.

                  I am having the same issue as @jtappen. In my case, all of my hosts had the enforce checkbox selected on my prior FOG server. After I moved everything to a new server for some reason the checkboxes got unchecked.
                  I tested with a few computers by clicking the checkbox and it works perfectly fine. My problem is that I have over 200 hosts so I would like to “checking ALL the checkboxes” by updating the database.

                  Would anything break if I run UPDATE hosts SET hostEnforce='1'; to update all hosts in one blow?

                  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
                  • S
                    Sebastian Roth Moderator
                    last edited by

                    @rodluz said in HostnameChanger Issue:

                    Would anything break if I run UPDATE hosts SET hostEnforce=‘1’; to update all hosts in one blow?

                    No, that shouldn’t break anything. I reckon it’s save to do - if you really want this.

                    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

                    153

                    Online

                    12.1k

                    Users

                    17.3k

                    Topics

                    155.3k

                    Posts
                    Copyright © 2012-2024 FOG Project