Hostnamechanger not working
-
HOLD A MOMENT! I just found out what the functionality of the “Host changes every cycle” checkbox is. I am going to set this and see if it fixes things… I didn’t have it checked before because I was not familiar with it.
-
@gwhitfield I can tell you all mine are checked , if that helps.
-
The enforce is user defined. Task reboot should work properly now. (For those having this issue). I know this thread isn’t the right place and I will post in the correct place.
-
@Tom-Elliott said in Hostnamechanger not working:
The enforce is user defined. Task reboot should work properly now. (For those having this issue). I know this thread isn’t the right place and I will post in the correct place.
Do you mean a version update is needed?
-
@gwhitfield What do you mean? Yes, I pushed a hotfix. To see it you need to update.
-
So I reverted my workstation VM and started fresh. I updated FOG server, reset encryption data for workstation, then powered up VM and installed new client on workstation. AD join is turned off but “Host changes every cycle” is checked for this host. It is not renaming the host, it seems to think the hostname is correct which it is not. Fog.log isn’t indicating any errors is there another log I can check?
-
@gwhitfield reboot the client. Does the info update?
-
As a test, I set the host to join AD. Fog.log shows domain join process and issues restart command to machine but nothing happens. Logging out doesn’t help machine to restart. When I manually restart machine everything comes together, machine name is changed and joined to domain. Here’s log from right before I set host to join AD, then waited until 2:00 to manually restart machine
--------------------------------------------------------- 5/5/2016 1:50 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/management/index.php?sub=requestClientInfo&mac=00:0C:29:F1:59:F9||00:00:00:00:00:00:00:E0&newService&json 5/5/2016 1:50 PM Middleware::Response Success 5/5/2016 1:50 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/service/getversion.php?clientver&newService&json 5/5/2016 1:50 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/service/getversion.php?newService&json 5/5/2016 1:50 PM Service Creating user agent cache 5/5/2016 1:50 PM Middleware::Response Success 5/5/2016 1:50 PM Middleware::Response No Printers ------------------------------------------------------------------------------ ---------------------------------ClientUpdater-------------------------------- ------------------------------------------------------------------------------ 5/5/2016 1:50 PM Client-Info Client Version: 0.10.5 5/5/2016 1:50 PM Client-Info Client OS: Windows 5/5/2016 1:50 PM Client-Info Server Version: 7488 5/5/2016 1:50 PM Middleware::Response Success ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------TaskReboot---------------------------------- ------------------------------------------------------------------------------ 5/5/2016 1:50 PM Client-Info Client Version: 0.10.5 5/5/2016 1:50 PM Client-Info Client OS: Windows 5/5/2016 1:50 PM Client-Info Server Version: 7488 5/5/2016 1:50 PM Middleware::Response Success ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ --------------------------------HostnameChanger------------------------------- ------------------------------------------------------------------------------ 5/5/2016 1:50 PM Client-Info Client Version: 0.10.5 5/5/2016 1:50 PM Client-Info Client OS: Windows 5/5/2016 1:50 PM Client-Info Server Version: 7488 5/5/2016 1:50 PM Middleware::Response Success 5/5/2016 1:50 PM HostnameChanger Checking Hostname 5/5/2016 1:50 PM HostnameChanger Hostname is correct ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ---------------------------------SnapinClient--------------------------------- ------------------------------------------------------------------------------ 5/5/2016 1:50 PM Client-Info Client Version: 0.10.5 5/5/2016 1:50 PM Client-Info Client OS: Windows 5/5/2016 1:50 PM Client-Info Server Version: 7488 5/5/2016 1:50 PM Middleware::Response No snapins ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ --------------------------------PrinterManager-------------------------------- ------------------------------------------------------------------------------ 5/5/2016 1:50 PM Client-Info Client Version: 0.10.5 5/5/2016 1:50 PM Client-Info Client OS: Windows 5/5/2016 1:50 PM Client-Info Server Version: 7488 5/5/2016 1:50 PM Middleware::Response No Printers ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -----------------------------------GreenFOG----------------------------------- ------------------------------------------------------------------------------ 5/5/2016 1:50 PM Client-Info Client Version: 0.10.5 5/5/2016 1:50 PM Client-Info Client OS: Windows 5/5/2016 1:50 PM Client-Info Server Version: 7488 5/5/2016 1:50 PM Middleware::Response No actions ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------UserTracker--------------------------------- ------------------------------------------------------------------------------ 5/5/2016 1:50 PM Client-Info Client Version: 0.10.5 5/5/2016 1:50 PM Client-Info Client OS: Windows 5/5/2016 1:50 PM Client-Info Server Version: 7488 5/5/2016 1:50 PM Middleware::Response Success ------------------------------------------------------------------------------ 5/5/2016 1:50 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/management/index.php?sub=requestClientInfo&configure&newService&json 5/5/2016 1:50 PM Middleware::Response Success 5/5/2016 1:50 PM Service Sleeping for 66 seconds 5/5/2016 1:51 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/management/index.php?sub=requestClientInfo&mac=00:0C:29:F1:59:F9||00:00:00:00:00:00:00:E0&newService&json 5/5/2016 1:51 PM Middleware::Response Success 5/5/2016 1:51 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/service/getversion.php?clientver&newService&json 5/5/2016 1:51 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/service/getversion.php?newService&json 5/5/2016 1:51 PM Service Creating user agent cache 5/5/2016 1:51 PM Middleware::Response Success 5/5/2016 1:51 PM Middleware::Response No Printers ------------------------------------------------------------------------------ ---------------------------------ClientUpdater-------------------------------- ------------------------------------------------------------------------------ 5/5/2016 1:51 PM Client-Info Client Version: 0.10.5 5/5/2016 1:51 PM Client-Info Client OS: Windows 5/5/2016 1:51 PM Client-Info Server Version: 7488 5/5/2016 1:51 PM Middleware::Response Success ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------TaskReboot---------------------------------- ------------------------------------------------------------------------------ 5/5/2016 1:51 PM Client-Info Client Version: 0.10.5 5/5/2016 1:51 PM Client-Info Client OS: Windows 5/5/2016 1:51 PM Client-Info Server Version: 7488 5/5/2016 1:51 PM Middleware::Response Success ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ --------------------------------HostnameChanger------------------------------- ------------------------------------------------------------------------------ 5/5/2016 1:51 PM Client-Info Client Version: 0.10.5 5/5/2016 1:51 PM Client-Info Client OS: Windows 5/5/2016 1:51 PM Client-Info Server Version: 7488 5/5/2016 1:51 PM Middleware::Response Success 5/5/2016 1:51 PM HostnameChanger Checking Hostname 5/5/2016 1:51 PM HostnameChanger Hostname is correct 5/5/2016 1:52 PM HostnameChanger Success, code = 0 5/5/2016 1:52 PM Power Creating shutdown command in 60 seconds 5/5/2016 1:52 PM Bus { "self": true, "channel": "Power", "data": "{\r\n \"action\": \"request\",\r\n \"period\": 60,\r\n \"options\": 2,\r\n \"command\": \"/r /c \\\"Host joined to Active Directory, restart required\\\" /t 0\",\r\n \"message\": \"This computer needs to perform maintenance.\"\r\n}" } 5/5/2016 1:52 PM Bus Emmiting message on channel: Power ------------------------------------------------------------------------------ 5/5/2016 1:52 PM Service Power operation being requested, checking back in 30 seconds 5/5/2016 1:52 PM Service Power operation being requested, checking back in 30 seconds 5/5/2016 1:53 PM Power Creating shutdown request 5/5/2016 1:53 PM Power Parameters: /r /c "Host joined to Active Directory, restart required" /t 0 5/5/2016 2:00 PM Main Overriding exception handling 5/5/2016 2:00 PM Main Bootstrapping Zazzles 5/5/2016 2:00 PM Controller Initialize 5/5/2016 2:00 PM entry Creating obj 5/5/2016 2:00 PM Controller Start 5/5/2016 2:00 PM Service Starting service 5/5/2016 2:02 PM Bus Became bus server 5/5/2016 2:02 PM Bus { "self": true, "channel": "Status", "data": "{\r\n \"action\": \"load\"\r\n}" } 5/5/2016 2:02 PM Bus Emmiting message on channel: Status ------------------------------------------------------------------------------ --------------------------------Authentication-------------------------------- ------------------------------------------------------------------------------ 5/5/2016 2:02 PM Client-Info Version: 0.10.5 5/5/2016 2:02 PM Client-Info OS: Windows 5/5/2016 2:02 PM Middleware::Authentication Waiting for authentication timeout to pass 5/5/2016 2:02 PM Middleware::Communication Download: http://MOSS-FOGSERVER/fog/management/other/ssl/srvpublic.crt 5/5/2016 2:02 PM Data::RSA FOG Server CA cert found 5/5/2016 2:02 PM Middleware::Authentication Cert OK 5/5/2016 2:02 PM Middleware::Communication POST URL: http://MOSS-FOGSERVER/fog/management/index.php?sub=requestClientInfo&authorize&newService 5/5/2016 2:02 PM Middleware::Response Success 5/5/2016 2:02 PM Middleware::Authentication Authenticated 5/5/2016 2:02 PM Bus Registering ParseBus in channel Power 5/5/2016 2:02 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/management/index.php?sub=requestClientInfo&mac=00:0C:29:F1:59:F9||00:00:00:00:00:00:00:E0&newService&json 5/5/2016 2:02 PM Middleware::Response Success 5/5/2016 2:02 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/service/getversion.php?clientver&newService&json 5/5/2016 2:02 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/service/getversion.php?newService&json 5/5/2016 2:02 PM Service Creating user agent cache 5/5/2016 2:02 PM Middleware::Response Success 5/5/2016 2:02 PM Middleware::Response No Printers ------------------------------------------------------------------------------ ---------------------------------ClientUpdater-------------------------------- ------------------------------------------------------------------------------ 5/5/2016 2:02 PM Client-Info Client Version: 0.10.5 5/5/2016 2:02 PM Client-Info Client OS: Windows 5/5/2016 2:02 PM Client-Info Server Version: 7488 5/5/2016 2:02 PM Middleware::Response Success ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------TaskReboot---------------------------------- ------------------------------------------------------------------------------ 5/5/2016 2:02 PM Client-Info Client Version: 0.10.5 5/5/2016 2:02 PM Client-Info Client OS: Windows 5/5/2016 2:02 PM Client-Info Server Version: 7488 5/5/2016 2:02 PM Middleware::Response Success ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ --------------------------------HostnameChanger------------------------------- ------------------------------------------------------------------------------ 5/5/2016 2:02 PM Client-Info Client Version: 0.10.5 5/5/2016 2:02 PM Client-Info Client OS: Windows 5/5/2016 2:02 PM Client-Info Server Version: 7488 5/5/2016 2:02 PM Middleware::Response Success 5/5/2016 2:02 PM HostnameChanger Checking Hostname 5/5/2016 2:02 PM HostnameChanger Hostname is correct 5/5/2016 2:02 PM HostnameChanger Host is already joined to target domain ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ---------------------------------SnapinClient--------------------------------- ------------------------------------------------------------------------------ 5/5/2016 2:02 PM Client-Info Client Version: 0.10.5 5/5/2016 2:02 PM Client-Info Client OS: Windows 5/5/2016 2:02 PM Client-Info Server Version: 7488 5/5/2016 2:02 PM Middleware::Response No snapins ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ --------------------------------PrinterManager-------------------------------- ------------------------------------------------------------------------------ 5/5/2016 2:02 PM Client-Info Client Version: 0.10.5 5/5/2016 2:02 PM Client-Info Client OS: Windows 5/5/2016 2:02 PM Client-Info Server Version: 7488 5/5/2016 2:02 PM Middleware::Response No Printers ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -----------------------------------GreenFOG----------------------------------- ------------------------------------------------------------------------------ 5/5/2016 2:02 PM Client-Info Client Version: 0.10.5 5/5/2016 2:02 PM Client-Info Client OS: Windows 5/5/2016 2:02 PM Client-Info Server Version: 7488 5/5/2016 2:02 PM Middleware::Response No actions ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----------------------------------UserTracker--------------------------------- ------------------------------------------------------------------------------ 5/5/2016 2:02 PM Client-Info Client Version: 0.10.5 5/5/2016 2:02 PM Client-Info Client OS: Windows 5/5/2016 2:02 PM Client-Info Server Version: 7488 5/5/2016 2:02 PM Middleware::Response Success ------------------------------------------------------------------------------ 5/5/2016 2:02 PM Middleware::Communication URL: http://MOSS-FOGSERVER/fog/management/index.php?sub=requestClientInfo&configure&newService&json 5/5/2016 2:02 PM Middleware::Response Success 5/5/2016 2:02 PM Service Sleeping for 91 seconds
-
@Tom-Elliott perhaps this is the same issue I have where he needs to disable the service until after the sysprep is complete?
-
@gwhitfield Try this, dis able the fog service in your pre sysrepped image and add these lines to your unattend.xml if you are using one:
<FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>del /Q /F c:\windows\system32\sysprep\unattend.xml</CommandLine> <Order>1</Order> <Description>Deletes unattend.xml</Description> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>del /Q /F c:\windows\Panther\unattend.xml</CommandLine> <Description>Deletes unattend.xml</Description> <Order>2</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>sc config FOGService start= auto</CommandLine> <Description>Changes FOG server to Automatic</Description> <Order>3</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>net start FOGService</CommandLine> <Description>Starts FOG service </Description> <Order>4</Order> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> </FirstLogonCommands>
All this happens in the OOBE phase of the sysprep. If your not using unattend try this batch file to run after it comes up:
sc config FOGService start= auto net start FOGService
paste that into a text file and save as SetupComplete.cmd. Then place the file in the following area: %WINDIR%\Setup\Scripts\
Then sysprep.
-
@Psycholiquid - I actually have that in my setupcomplete.cmd to stop FOG and then start it once completed. However, I have not sysprepped this host yet. I am still building the master image. I was expecting that as soon as the FOG client service started it would see the discrepancy in hostname and change it immediately, restarting the machine to complete the task I have only just in the last couple days started using the new client so I’m used to how the “old” ones act.
-
@gwhitfield There is an issue I have that if the service is running during sysprep is causes issue that mimic what you are seeing, So I just disabled it and then let the commands turn it back on and set it to start once sysprep is complete.
-
@gwhitfield Also keep in mind I only see this reaction with Windows 7 after I applied some updates. So it could be a mix of things causing it.
-
@Tom-Elliott - Yes, when I manually reboot the client the machine name changes and the AD join is done. It only takes the one reboot though, almost like it was all done in the background without any signs it was happening.
-
@Tom-Elliott - Just to clarify what I’m seeing with my crazy machine - when host name is changed in FOG console, nothing happens on host (edit: even when manually restarted). When host is set in FOG console to join domain and is manually restarted, then both the machine name AND the domain join happen.
-
Yet another update. Now that my host has correct name to match what’s in FOG console, and the host is joined to the domain I decided to test to see what would happen if I rename it in the FOG console. Log is below. Host does not restart on it’s own:
------------------------------------------------------------------------------ --------------------------------HostnameChanger------------------------------- ------------------------------------------------------------------------------ 5/5/2016 2:33 PM Client-Info Client Version: 0.10.5 5/5/2016 2:33 PM Client-Info Client OS: Windows 5/5/2016 2:33 PM Client-Info Server Version: 7488 5/5/2016 2:33 PM Middleware::Response Success 5/5/2016 2:33 PM HostnameChanger Checking Hostname 5/5/2016 2:33 PM HostnameChanger Removing host from active directory 5/5/2016 2:33 PM HostnameChanger ERROR: Required ADDom information is missing 5/5/2016 2:33 PM HostnameChanger Renaming host to MOSSIMAGEVMTEST 5/5/2016 2:33 PM Power Creating shutdown command in 60 seconds 5/5/2016 2:33 PM Bus { "self": true, "channel": "Power", "data": "{\r\n \"action\": \"request\",\r\n \"period\": 60,\r\n \"options\": 2,\r\n \"command\": \"/r /c \\\"FOG needs to rename your computer\\\" /t 0\",\r\n \"message\": \"This computer needs to perform maintenance.\"\r\n}" } 5/5/2016 2:33 PM Bus Emmiting message on channel: Power ------------------------------------------------------------------------------ 5/5/2016 2:33 PM Service Power operation being requested, checking back in 30 seconds 5/5/2016 2:34 PM Service Power operation being requested, checking back in 30 seconds 5/5/2016 2:34 PM Power Creating shutdown request 5/5/2016 2:34 PM Power Parameters: /r /c "FOG needs to rename your computer" /t 0
-
@gwhitfield Small question why are you trying to rename the computer before sysprepping? Your master image should never join the domain. This can cause issues when you sysprep and that image still has some of the policies of your domain in the image.
This can cause auto logon to not work along with a bunch of other issues. That being said I have done it to get some software to work then dropped it back, reset the Admin password to blank and it worked fine but I really don’t recommend it.
-
@Psycholiquid - good question. I do not let my master image ever join the domain before sysprep. When I sysprepped my master image and deployed it last night, it didn’t rename or join domain on it’s own so I’m troubleshooting that issue. The client version was 7.2 which I am now attempting to bringing up to 10.5 to keep up with the latest server version.
The server is new, this is the only image on it. The image was sysprepped and uploaded with no apparent problems yesterday, but obviously something is wrong when it’s deployed. I had hoped it was just a bad client but the new client isn’t working either.
What I’m doing now is testing what will happen when the sysprepped image is deployed. Since all my fog servers (up til now) have made hostname and AD joins happen automatically with reboots, I’m hoping to get back to that. Unfortunately it looks like it’s needing a manual restart to complete the task which I’m sure isn’t right.
-
@gwhitfield Yeah that was the same issue I was having and had to deploy the disabled service and start after sysprep to overcome. Now I agree that the old server didnt do that and nor did mine, but once I went to using trunk I had to switch to this method.
-
I think the FOG gods are laughing at me. I uninstalled client v10.5 installed my oldest client back from 2010 with the encrypted password in hostnamechanger.dll and as soon as I started the service it renamed and restarted the host. I’m tempted to stay with it and use it for my master image - it works awesome like it always has. Not sure of the downside to staying with old client though… any thoughts?