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: http://www.fogproject.org/wiki/index.php?title=Managing_FOG#Users

    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


  • Senior Developer



  • 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?


  • Senior Developer

    This post is deleted!

  • Senior Developer

    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. (https://github.com/mastacontrola/fogproject/blob/dev-branch/FOGService/src/FOG_HostNameChanger/MOD_HostNameChanger.cs). Download that version and use it instead, it will support both hosts with and without product keys.



  • 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 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.



  • 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
    http://192.168.0.1/fog/service/debug.php
    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.



  • 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


  • Senior Developer

    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.



  • 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


  • Senior Developer

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



  • 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


  • Senior Developer

    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.


Log in to reply
 

407
Online

38731
Users

10556
Topics

99953
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.