Active Directory registration not working Windows 7 x64 client
-
[quote=“Wolfbane8653, post: 41917, member: 3362”][CODE]2/9/2015 10:11 AM FOG::HostnameChanger Index was outside the bounds of the array.
2/9/2015 10:11 AM FOG::HostnameChanger at FOG.HostNameChanger.changeHostName()[/CODE]A quick search reviles…[/quote]
Hi Wolfbane, thanks for the quick reply! As I’d noted, I already found this post and tested accordingly, but it didn’t seem to apply to this situation. With no product key I do get the ‘index was outside the bounds of the array’ message. For the heck of it, I tested with a product key added and it still failed. I got a slightly different error message:
[B]2/9/2015 11:38 AM FOG::HostnameChanger Failed: Incomplete server response; got: 7; wanted: 6.
2/9/2015 11:38 AM FOG::HostnameChanger Host name was not found in the database.[/B]When i searched for that, the only resolution I could find was to set the FOG service to start as ‘Automatic (Delayed)’. This didn’t resolve that issue. Since I wasn’t trying to use a product key anyway, it felt like I was falling down the wrong rabbit hole and decided to back up and try and resolve the original issue.
Having said that, you guys know much more about what’s under the hood than I do, so if you think patching my hostnamechange.dll with my passkey caused this problem, then please let me know. I did it according to the documentation, so I assumed that it would work OK. I also didn’t see anyone else mention having trouble with hostname changes after patching with a new passkey.
Thanks!
Daniel -
Please do the following:
[quote=“Jbob, post: 36278, member: 21733”]It would seem some incompatible data is being retrieved by the Client. In order to help your further I would need to see the data the client receives (you may asterisk out any information you feel should remain private such as your AD password. If you still feel uncomfortable with posting the information you may PM me with it). To see what data is being sent, get the MAC address of one of the clients that is failing. Then open a browser tab, and go to the url (change the bolded parts as needed):
[B]FOG_SERVER_ADDRESS[/B]/fog/service/hostname.php?mac=[B]XX[/B][B]:XX:XX:XX:XX:XX[/B]And then post/pm me the output shown (remember to asterisk any private info)
I also need to know if you are using the prebuilt HostnameChanger.dll or you compiled your own version.[/quote]
-
[quote=“Jbob, post: 41922, member: 21733”]Please do the following:[/quote]
Hi Bob, I’ve already posted it. It’s in the top of my code block under ‘Web service’.Also, I did notice in the other post about patching the .dll that Wolf mentioned, it said that there is updated hostnamechanger.dll source in the SVN. I did actually try and get that over the weekend, but the SVN only pulled all of the source except for the Windows code for hostnamechanger.dll. The code I used to patch the .dll with my passkey was from the main distributable for 1.2.0 on SourceForge, fog_1.2.0.tar.gz.
Thanks!
-
Sorry about that, I didn’t see you included that info. It would seem that you did not build with the patched version. SVN no longer includes our legacy client and the source file in fog_1.2.0.tar.gz is not patched. Please use this version instead:
[url]https://github.com/FOGProject/fogproject/tree/4b6a98a5a5ab552fbe066e062af857b33a17a15f/FOGService/src/FOG_HostNameChanger[/url] -
Awesome, I’ll pull it down now and give it a go. I’ll post an update once I’ve completed the testing.
Thanks guys!
Daniel
-
OK, I’ve recompiled hostnamechanger.dll from the Git repository and everything is now working as expected. Thanks again for the help!
-
Is it possible to make a new hostnamechanger.dll available for download? I’m having problems too with connecting Windows 7 x64 clients. Haven’t checked for this particular message yet, but in case I have it, would be useful to give a new hostnamechanger.dll with default passphrase encryption a go.
-
Per-request a patched version of the HostNameChanger dll with the default pass key. Please ensure the file name is correct (it may be wrong).
[url]https://dl.dropboxusercontent.com/u/18664328/HostNameChanger.dll[/url]
-
Yeah, the name was HostNameChange.dll. But didn’t work for me. Where is that fog.log talked about above? Couldn’t find this. Anyway to enable debugging to see if it at least gets activated and to check where it fails?
-
Sorry, found c:\fog.log, but it’s basically empty. Can I trigger HostNameChange.dll manually?
-
[code]net stop “FOG Service”
del c:\fog.log
net start “FOG Service”[/code] -
To watch the log, open a powershell and run:
[code]get-content -wait c:\fog.log[/code]
-
Much appreciated Tom, with powershell, first time I’ve used this, I was able to get the contents, seems log gets emptied at some point. This is what I see:
[CODE]16/02/2015 2:41 p.m. FOG::HostnameChanger Attempting to connect to fog server…
16/02/2015 2:41 p.m. FOG::HostnameChanger Module is active…
16/02/2015 2:41 p.m. FOG::HostnameChanger AD mode requested, confirming settings.
16/02/2015 2:41 p.m. FOG::HostnameChanger Padding is invalid and cannot be removed.
16/02/2015 2:41 p.m. FOG::HostnameChanger at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte
[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode,
Boolean fLast)
at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset,
Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at FOG.FOGCrypt.decrypt(Byte[] cipherData, Byte[] Key, Byte[] IV)
at FOG.FOGCrypt.decrypt(Byte[] cipherData, String Password)
at FOG.FOGCrypt.decryptHex(String hex)
at FOG.HostNameChanger.changeHostName()
[/CODE]Error looks similar to [URL=‘http://fogproject.org/forum/threads/fog-hostnamechanger-padding-is-invalid-and-cannot-be-removed.1078/’]this thread[/URL].
Had an a.b.c style DOMAIN, Administrator user did not have domain name in front. Have triple checked I got the password correct. The user is “Administrator” i.e. with all permissions as of this moment, as I’m trying to debug one problem at a time.
-
This is what I get with the original HostnameChange.dll:
[CODE] 16/02/2015 2:49 p.m. FOG::HostnameChanger Attempting to connect to fog server…
16/02/2015 2:49 p.m. FOG::HostnameChanger Attempting to connect to fog server…
16/02/2015 2:49 p.m. FOG::HostnameChanger Module is active…
16/02/2015 2:49 p.m. FOG::HostnameChanger Module is active…
16/02/2015 2:49 p.m. FOG::HostnameChanger AD mode requested, confirming settings.
16/02/2015 2:49 p.m. FOG::HostnameChanger AD mode requested, confirming settings.
16/02/2015 2:49 p.m. FOG::HostnameChanger Hostname is up to date
16/02/2015 2:49 p.m. FOG::HostnameChanger Hostname is up to date
16/02/2015 2:49 p.m. FOG::HostnameChanger Attempting to join domain if not already a member…
16/02/2015 2:49 p.m. FOG::HostnameChanger Domain Error! (‘Unknown Error’ Code: 1791)
16/02/2015 2:49 p.m. FOG::HostnameChanger Domain Error! (‘Unknown Error’ Code: 1326)[/CODE]PS: had to split posts, as get a message that this was marked as spam by Askimet or something like that.
-
From your comments [URL=‘http://fogproject.org/forum/threads/requests-for-wiki-access-ask-here.3811/page-2#post-42253’]here[/URL]. I am assuming that you have partly figured this out?
This error usually occurs due to the password not being encrypted correctly.
Check here and double check your settings.
[url]http://www.fogproject.org/wiki/index.php/FOGCrypt[/url][B]EDIT[/B]
OR the user you are inputting does not have the proper rights in your AD to join computers to the domain. -
[quote=“Berend de Boer, post: 42246, member: 28367”]
Had an a.b.c style DOMAIN, Administrator user did not have domain name in front. Have triple checked I got the password correct. The user is “Administrator” i.e. with all permissions as of this moment, as I’m trying to debug one problem at a time.[/quote]
It is worth mentioning that this user needs to be a domain user with rights to add computers to the domain, not a user on the computer. -
[quote=“Junkhacker, post: 42278, member: 21583”]It is worth mentioning that this user needs to be a domain user with rights to add computers to the domain, not a user on the computer.[/quote]
Yep, it’s the domain administrator. I just wanted to avoid having permission issues, so using max permissions for now.
-
[quote=“Wolfbane8653, post: 42276, member: 3362”]From your comments [URL=‘http://fogproject.org/forum/threads/requests-for-wiki-access-ask-here.3811/page-2#post-42253’]here[/URL]. I am assuming that you have partly figured this out?
This error usually occurs due to the password not being encrypted correctly.[/quote]
That’s what one would think, but have triple checked the password, and got another person to check the encrypted password too.
But note I was using the old HostnameChanger and the new one. What error does indicate password not being encrypted correctly? Because I got different errors in both cases.
-
16/02/2015 2:49 p.m. FOG::HostnameChanger Domain Error! (‘Unknown Error’ Code: 1791)
16/02/2015 2:49 p.m. FOG::HostnameChanger Domain Error! (‘Unknown Error’ Code: 1326)Those errors are messages coming directly from microsoft during the domain join process.
Look them up and you may have a better/clearer answer. The error codes you see are not FOG generated
-
The error codes appear to be as per [url]http://www.hiteksoftware.com/knowledge/articles/049.htm[/url]
[SIZE=4][FONT=arial][COLOR=#000000]1326 Logon failure: unknown user name or bad password.[/COLOR][/FONT][/SIZE]
[SIZE=4][FONT=arial][COLOR=#000000]1791 A remote procedure call is already in progress for this thread.[/COLOR][/FONT][/SIZE]