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

    Troubles with recompiling the hostname module

    Scheduled Pinned Locked Moved
    FOG Problems
    5
    14
    5.0k
    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
      Joe Schmitt Senior Developer
      last edited by

      Yep, exactly what you said, upload the HostnameChange.dll file. If you have any errors compiling, please let me know.

      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.

      1 Reply Last reply Reply Quote 0
      • S
        Scott Mayo
        last edited by

        Thanks. I will see how it goes. I had it compiled that far.

        I do have a question though. Where is the PassKey used at? Do I need to put the .dll on the client also for some sort of key verification?

        The PassKey is not actually the user’s password that is used to add the computers to the domain is it? I assume it and the password that you encrypt with FOGCrypt are two separate passwords.

        I guess it has me a bit confused on the FOGCrypt. I change the config.ini file to have the PassKey I then use the FOGCrypt utility to encrypt the password to enter into the FOG console. Where does that config.ini file stay? It is readable so that kind of kills the security.

        Am I looking at that wrong? Thanks.
        Scott

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

          The FOGCrypt config.ini is the only one storing the Key. The key is stored, for FOGCrypt, in it’s relative config.ini.

          Once you have the encrypted password from FOGCrypt.exe, you can completely delete the FOGCrypt folder.

          When recompiling the file, the MOD_HostNameChanger.cs file contains the Encryption/Decryption Key at around line 129 in the current codebase. The key you used to encrypt the password with needs to be the same in this file as it’s the only way to decrypt the now encrypted password string.

          While this is stored in the file, you can delete the FOGService folder once the dll has been compiled.

          1 Reply Last reply Reply Quote 0
          • S
            Scott Mayo
            last edited by

            Thank Tom. My coffee had not had time to kick in this morning I guess. I see what you are saying there.

            I appreciate the help.

            Scott

            1 Reply Last reply Reply Quote 0
            • S
              Scott Mayo
              last edited by

              Seems it will not change the name of the host or add to the domain.

              I went through the steps of recompiling with a different PassKey. Basically got to the point of double-clicking the MOD_HostNameChanger.cs file and changed the Private const String PASSKEY = “12345”.

              I then “Saved All” and “Build Solution”

              I went to the Client Updater in the FOG Server Console and upload the hostnamechange.dll from C:\FOG Service\src\FOG_HostNameChanger\bin\Release.

              I changed the C:\FOGCrypt\etc\config.ini file to contain
              [main]
              passkey=12345

              I did a FOGCrypt <user_that_can_add_to_domain_password> and entered the encrypted key into my [FONT=Ubuntu][COLOR=#555555]FOG_AD_DEFAULT_PASSWORD on the FOG Configuration page.[/COLOR][/FONT]

              I downloaded the FOG Client from FOGIPADDRESS\fog\client and set it up on my client.

              Nothing was happening as far as changing the hostname. I then thought that maybe since the Installer was not actually recomplied that maybe the client still had the old hostnamechange.dll so I copied it over to the client.

              I am still not getting ti to change the hostname.

              This is FOG 1.2.0 and here is my FOG.LOG file from the client. I assume it has somethign to do with the Index was outside the bounds of the array below error, but I do not know. Any suggestions?

              Thanks.
              Scott

              8/11/2014 9:24 AM FOG::UserTracker Module is active…
              8/11/2014 9:24 AM FOG::TaskReboot Module is active…
              8/11/2014 9:24 AM FOG::TaskReboot Attempting to connect to fog server…
              8/11/2014 9:24 AM FOG::AutoLogOut Module is active…
              8/11/2014 9:24 AM FOG::AutoLogOut c:\program files\fog\images\alo-bg.jpg
              8/11/2014 9:24 AM FOG::AutoLogOut at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)
              at FOG.AutoLogOut.doWork()
              8/11/2014 9:24 AM FOG::AutoLogOut Creating ALO interface.
              8/11/2014 9:24 AM FOG::AutoLogOut Tracker thread is waiting for interface.
              8/11/2014 9:24 AM FOG::TaskReboot No task found for client.
              8/11/2014 9:24 AM FOG::HostnameChanger Attempting to connect to fog server…
              8/11/2014 9:24 AM FOG::HostnameChanger Module is active…
              8/11/2014 9:24 AM FOG::HostnameChanger Index was outside the bounds of the array.
              8/11/2014 9:24 AM FOG::HostnameChanger at FOG.HostNameChanger.changeHostName()
              8/11/2014 9:24 AM FOG::UserTracker Event: LOGIN for test\user1
              8/11/2014 9:24 AM FOG::UserTracker Record processed by server!
              8/11/2014 9:24 AM FOG::GUIWatcher Message found, attempting to notify GUI!
              8/11/2014 9:24 AM FOG::PrinterManager Management level = 0
              8/11/2014 9:24 AM FOG::PrinterManager This host is set to NO MANAGEMENT, we will exit now.
              8/11/2014 9:24 AM FOG::PrinterManager Major printing operations complete, moving to tracking mode.
              8/11/2014 9:24 AM FOG::GUIWatcher Dispatch OK!
              8/11/2014 9:24 AM FOG::PrinterManager New user detected: test\user1
              8/11/2014 9:24 AM FOG::PrinterManager Waiting for tray to load…
              8/11/2014 9:25 AM FOG::MODDebug Reading config settings…
              8/11/2014 9:25 AM FOG::MODDebug Reading of config settings passed.
              8/11/2014 9:25 AM FOG::MODDebug Starting Core processing…
              8/11/2014 9:25 AM FOG::MODDebug Operating System ID: 6
              8/11/2014 9:25 AM FOG::MODDebug Operating System Minor: 1
              8/11/2014 9:25 AM FOG::MODDebug MAC ID 0 xx:xx:xx:xx:xx:xx
              8/11/2014 9:25 AM FOG::MODDebug MAC POST String: xx:xx:xx:xx:xx:xx
              8/11/2014 9:25 AM FOG::MODDebug A user is currently logged in
              8/11/2014 9:25 AM FOG::MODDebug Username: test\user1
              8/11/2014 9:25 AM FOG::MODDebug Hostname: test
              8/11/2014 9:25 AM FOG::MODDebug Attempting to open connect to: [url]http://192.168.0.1/fog/service/debug.php[/url]
              8/11/2014 9:25 AM FOG::MODDebug Server responded with: Hello FOG Client
              8/11/2014 9:25 AM FOG::MODDebug Module has finished work and will now exit.

              1 Reply Last reply Reply Quote 0
              • M
                Michael McCormick
                last edited by

                I am actually getting the same index out of bounds error. I adjusted the hosenamechanger.dll and rebuilt the fog service with it, And the issue persists. The only thing i haven’t done is tried it with the original passkey that came with fog.

                1 Reply Last reply Reply Quote 0
                • M
                  Michael McCormick
                  last edited by

                  I’ve since gone back and used the original hostnamechanger.dll and it provides the same index out of bounds error.

                  So whether i use the original hostnamechanger.dll or the one i modified and rebuilt. I get the same error.

                  1 Reply Last reply Reply Quote 0
                  • J
                    Joe Schmitt Senior Developer
                    last edited by

                    I believe that the problem lies with the product key modification. The deprecated service (the one in the current stable builds that you are running) will throw an error if it does not receive an EXACT amount of info from the server. The new Hostnamechanger expects extra data compared to the original as it can now handle a product key. Linked is a copy of a modified Hostnamechanger that will solve this issue. ([url]https://github.com/mastacontrola/fogproject/blob/dev-branch/FOGService/src/FOG_HostNameChanger/MOD_HostNameChanger.cs[/url]). Download that version and use it instead, it will support both hosts with and without product keys.

                    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.

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

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • C
                        ChrisJ
                        last edited by

                        hmmm. Getting the same issue as above but the github file location is giving me a 404. Are we any closer to getting a solution?

                        1 Reply Last reply Reply Quote 0
                        • J
                          Joe Schmitt Senior Developer
                          last edited by

                          The legacy service was removed in recent versions. Use this link instead:
                          [url]https://github.com/FOGProject/fogproject/blob/b17cbe8fa277ef32f4ec04d80c1526ab9de9586c/FOGService/src/FOG_HostNameChanger/MOD_HostNameChanger.cs[/url]

                          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.

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

                          185

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project