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

    Host Name/ Active Directory Issue

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    17
    4.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.
    • S
      Sebastian Roth Moderator
      last edited by Sebastian Roth

      @Andrew134 said:

      It may be important to note that when I re-added the host and let it boot up it changed the name and added the machine to AD without the need to reimage it again.

      Thanks for mentioning! I think this should lead us where to look for the reason. I have to admit that I don’t know FOG 0.32 much at all. That was long before I joined in. FOG 1.2.0 (as well as current FOG trunk) have a mysql table storing which services are enabled for each host. It’s called ‘moduleStatusByHost’. Maybe FOG 0.32 didn’t have that table or it was not ex/imported properly?! Check the host’s services settings either via web gui (Host Management -> select a host -> Service Settings (menu on the left)):

      mysql> SELECT modules.name,moduleStatusByHost.msState FROM modules,moduleStatusByHost
                    WHERE moduleStatusByHost.msModuleID = modules.id AND moduleStatusByHost.msHostID = 1738;
      +-------------------+---------+
      | name              | msState |
      +-------------------+---------+
      | Directory Cleaner | 1       |
      | Printer Manager   | 1       |
      | Task Reboot       | 1       |
      | User Tracker      | 1       |
      | Auto Log Out      | 1       |
      | Green FOG         | 1       |
      | Snapins           | 1       |
      | Client Updater    | 1       |
      | Host Registration | 1       |
      | Hostname Changer  | 1       |
      +-------------------+---------+
      10 rows in set (0.01 sec)
      

      You definitely want to see “Hostname Changer” enabled… Otherwise renaming (and AD join) won’t work.

      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

      A 1 Reply Last reply Reply Quote 0
      • A
        Andrew134 @Sebastian Roth
        last edited by Andrew134

        @Sebastian-Roth You may be on to something. I ran the command with a old host and then one I re-added and got this.
        0_1459262584358_Modules_status.txt
        Any ideas on how to fix this? Or should we try again with the old database? We still have the old fog server in place where I can check for these records as well.

        Update: went to old server and the modules table does not exist in the database.

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

          You can certainly continue on the road of installing 1.2.0, but it’s becoming dated. And a lot of newer devices will not work with it.

          Our senior developer, @Tom-Elliott says that you can upgrade to FOG Trunk from any version of fog without issue, even version 0.01. And newer hardware works with FOG Trunk, and it has better partition handling, and massive speed and performance improvements over past fog versions. We believe it’s close to release as well - but that being said, it’s the developmental version and there will be bugs, you just report them here and they are usually fixed in under an hour - the longest I’ve seen it take is a few days. (compare that to months with Google, half a year to a year with Microsoft)

          I’d say if you’re building a brand new server, try 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
          • S
            Sebastian Roth Moderator
            last edited by Sebastian Roth

            @Andrew134 said:

            Update: went to old server and the modules table does not exist in the database.

            Ok, so now at least we know why… I don’t know the older FOG versions at all. I guess I could look into the code but it’s of no use because as a matter of fact you don’t seam to have the table(s) on the old database.

            I guess you better go for populating the missing DB tables yourself:

            mysql> INSERT INTO `modules` VALUES
                (1,'Directory Cleaner','dircleanup','This setting will enable or disable the directory cleaner service module on this specific host.  If the module is globally disabled, this setting is ignored.',1),
                (2,'User Cleanup','usercleanup','This setting will enable or disable the user cleaner service module on this specific host.  If the module is globally disabled, this setting is ignored.  The user clean up service will remove all stale users on the local machine, accept for user accounts that are whitelisted.  This is typically used when dynamic local users is implemented on the workstation.',1),
                (3,'Display Manager','displaymanager','This setting will enable or disable the display manager service module on this specific host.  If the module is globally disabled, this setting is ignored.',1),
                (4,'Auto Log Out','autologout','This setting will enable or disable the auto log out service module on this specific host.  If the module is globally disabled, this setting is ignored.',1),
                (5,'Green FOG','greenfog','This setting will enable or disable the green fog service module on this specific host.  If the module is globally disabled, this setting is ignored.',1),
                (6,'Snapins','snapinclient','This setting will enable or disable the snapin service module on this specific host.  If the module is globally disabled, this setting is ignored.',1),
                (7,'Client Updater','clientupdater','This setting will enable or disable the client updater service module on this specific host.  If the module is globally disabled, this setting is ignored.',1),
                (8,'Host Registration','hostregister','This setting will enable or disable the host register service module on this specific host.  If the module is globally disabled, this setting is ignored.',1),
                (9,'Hostname Changer','hostnamechanger','This setting will enable or disable the hostname changer module on this specific host.  If the module is globally disabled, this setting is ignored.',1),
                (10,'Printer Manager','printermanager','This setting will enable or disable the printer manager service module on this specific host.  If the module is globally disabled, this setting is ignored.',1),
                (11,'Task Reboot','taskreboot','This setting will enable or disable the task reboot service module on this specific host.  If the module is globally disabled, this setting is ignored.',1),
                (12,'User Tracker','usertracker','This setting will enable or disable the user tracker service module on this specific host.  If the module is globally disabled, this setting is ignored.',1);
            

            and

            mysql> DELETE FROM moduleStatusByHost;
            mysql> INSERT INTO moduleStatusByHost (msHostID, msModuleID, msState) SELECT hosts.hostID,modules.id,'1' from hosts,modules WHERE modules.default = 1 ORDER BY hosts.hostID,modules.id;
            

            This will enable all the (default) modules for all your hosts in one go!

            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

            A 1 Reply Last reply Reply Quote 0
            • A
              Andrew134 @Sebastian Roth
              last edited by

              @Sebastian-Roth I keep getting this error message when I attempt to run the the last command.

              ERROR 1054 (42S22): Unknown column ‘modules.default’ in ‘where clause’

              Any ideas?

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

                @Sebastian-Roth said:

                INSERT INTO moduleStatusByHost (msHostID, msModuleID, msState) SELECT hosts.hostID,modules.id,‘1’ from hosts,modules WHERE modules.default = 1 ORDER BY hosts.hostID,modules.id;

                Change the line to:

                INSERT INTO `moduleStatusByHost` (`msHostID`, `msModuleID`, `msState`) SELECT `hosts`.`hostID`,`modules`.`id`,'1' from `hosts`,`modules` WHERE `modules`.`default` = 1 ORDER BY `hosts`.`hostID`,`modules`.`id`;
                

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

                  This is needed because the word default is a MYSQL keyword. the backticks “escape” the caller.

                  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 Sebastian Roth

                    Thanks Tom! The other option would be to dismiss the WHERE clause altogether and have it set all the modules for all hosts:

                    INSERT INTO moduleStatusByHost (msHostID, msModuleID, msState) SELECT hosts.hostID,modules.id,'1' from hosts,modules ORDER BY hosts.hostID,modules.id;
                    

                    As well I totally agree with what Wayne said about FOG 1.2.0 being dated and looking into FOG trunk or the near release would be a good idea. BUT you still want to have all your hosts and settings in the new system and therefore we better get your DB up and ready for FOG 1.2.0 first and then move on (after taking a full backup!).

                    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
                    • A
                      Andrew134
                      last edited by

                      That seems to have done it thanks you guys.

                      While I am asking questions, in .32 the domain username had to be in domain\username format, however in 1.2 it was updated to just need the username is there an easy way to update all the hosts or should I just change them when I reimage those machines?

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

                        @Andrew134 Something you could do in MySQL as well. No guarantee this is working for all special cases. I only tested this with some values to make sure it usually works! Should not kill your entries if hostADUser has no \ in them. But better make a backup of the hosts table before trying this and/or add WHERE hostID = X to test on single entries first!!

                         UPDATE hosts AS h1, hosts AS h2 SET h1.hostADUser = SUBSTR(h2.hostADUser, LOCATE('\\', h2.hostADUser)+1);
                        

                        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
                        • A
                          Andrew134
                          last edited by

                          I ended up just adding them to groups and changing them using the group active directory section. Thanks again for all you guy’s help!

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

                          171

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project