Troubles with recompiling the hostname module
-
I just setup a new FOG server which is version 1.2.0. I am needing to recompile the hostname module with a different passkey for letting my clients join the domain.
I don’t recall having any trouble with this last time, of course that was 6 or so years ago. I am following the instructions here: [url]http://www.fogproject.org/wiki/index.php?title=Managing_FOG#Users[/url]
I change the password, save all, and build the solution, but then when I try to open up the FogService.sln, it seems that the FOG Service Installer is incompatible with Visual studio or something [It has (Incompatible) next to it].
I have tried Visual Studio 2013, 2010 and 2008. The 2008 actually gives me “csproj cannot be opened because its project type is not supported by this version of the application.”
Anyone else seeing this or have a good fix for it? I would like to get rid of the generic opensource password if possible.
Thanks for any suggestions.
Scott -
Scott, unfortunately the service installer uses a deprecated project format. I am working on a full rewrite of the FOG Service but I have no estimated completion date yet. Your best bet may be to just compile the HostnameChanger by itself and upload it to the FOG update section on the web interface. If you wish to recompile the installer please let me know, I should be able to throw something together for you.
-
So I just need to change the password in the source, Save All and Build Solution. Then go to Fog Configuration->Client Updater and upload the file? Which file is it that I need to upload? Just the HostnameChange.dll?
I am good with whatever I need to do to get rid of the Generic OpenSource passkey.
Thanks for the reply.
Scott -
Yep, exactly what you said, upload the HostnameChange.dll file. If you have any errors compiling, please let me know.
-
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 -
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.
-
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
-
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=12345I 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.
Scott8/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. -
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.
-
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.
-
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.
-
This post is deleted! -
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?
-
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]