Domain join and re-join issues
-
Hi,
I’m running Fog 1.6.1, I’ve tried agents up to 0.1.39
When I image a machine which has no domain account the agent logs:
directory rejoin: blocked (directory_observation_unknown)When I image a machine which does have a domain account, in the console I get the check box “Confirm that this account is assigned to this host…”. But checking it and updating does nothing.
Either way my machines are not joining the domain.
Is there any way of disabling or automating the re-join check? I have 3000 hosts, and my largest labs are 100+ stations. If I need to re-image a large lab it’ll be tedious having to confirm every re-join.
Thank you,
Adam
-
@AdamC Hi Adam,
Thank you for the detail. The message
directory_observation_unknownhas more than one cause. These three facts tell us which cause applies to you.-
Is the image you deploy joined to the domain when you capture it? Is it sysprepped?
-
Open one affected host in the FOG web UI and go to the Active Directory tab. What does the “Domain Join Status” line show?
-
On one affected PC, run this in PowerShell as administrator, and post the output:
Test-ComputerSecureChannel -Verbose (Get-CimInstance Win32_ComputerSystem) | Select-Object Domain, PartOfDomain, DomainRole Test-NetConnection <your DC name> -Port 445
Also check the AD Domain field on that host. Is it your DNS domain name (for example
corp.example.edu), or the short name?About the confirmation checkbox: it saves when you click Update, but the page does not show that it saved. We will fix that display. The rejoin still waits on the first problem, so we need to find that cause first.
About large labs: I understand that a confirmation for each host does not scale to 100+ stations. We are looking at how to handle this.
Tom
-
-
@Tom-Elliott Hi Tom
-
The image is not domain joined or sysprepped
-
Domain Join Status: Needs operator review
-
Test-ComputerSecureChannel : Cannot verify the secure channel password for the local computer. The local computer is not currently part of a domain.
Domain PartOfDomain DomainRole
ASEGSADG False 0
TcpTestSucceeded : True
The AD Domain field contains the DNS domain name
Regarding the confirmation checkbox, I just meant checking it and hitting apply produces no results. The machine never joins the domain after confirming.
Thanks,
Adam
-
-
@AdamC Thank you, that narrows it to one cause.
Your PCs are in a workgroup, so FOG should plan a plain domain join, not a rejoin. FOG blocks only when its stored record of the PC’s membership does not say “workgroup”. So FOG holds an old membership record for these hosts, probably “joined to the domain” from before the re-image, and the agent has not replaced it.
Please check one affected host:
- In the FOG web UI, open Reports, then Directory Membership. Find the host. What do the “Observed domain” and “Reported” columns show?
- Open the host, then its Agent Activity (or the Audit Log, filtered on the host). What does the latest line that starts with “agent reported directory membership:” say, and when?
About the checkbox: the confirmation saves, but it cannot start a join while the membership record is wrong. That is why nothing happened.
About large labs: the next release removes the per-host confirmation. A Deploy now rebinds to the existing computer account without a click, and FOG writes an audit entry for each one. It is on dev-branch now.
-
- Observed domain: FQDN of my domain, Reported: 2026-12-02 16:24:06
That reported value is weird. The machine is on, and I redeployed it this morning to test something.
- The last “agent reported directory membership” record is from 10:24 am yesterday, at that time it reported that it was in my domain. At that time I had manually joined the machine to my domain, then re-imaged to test re-join.
-
@AdamC Thank you. That confirms the cause.
The agent sends a fact only when it differs from its own saved copy of the last one it sent. That copy is on the disk. Your image brought back an older copy that matches the re-imaged PC, so the agent sent nothing. FOG kept the “joined” record from 10:24, and the rejoin waited for a workgroup report that never came.
The fix is FOGProject/fogproject#2403. After a completed Deploy, the server asks the agent for all its facts again. It is on dev-branch now, and reaches stable with the next release.
To unblock a host on 1.6.1 now, run this in the fog database. Replace PC-NAME with the host’s name in FOG:
DELETE FROM hostFactState WHERE hfsHostID = (SELECT hostID FROM hosts WHERE hostName = 'PC-NAME');This deletes only FOG’s record of which facts it has. At its next poll the agent sends all its facts again, and the PC joins at the poll after that. For a whole lab, for example names that start with LAB1-:
DELETE FROM hostFactState WHERE hfsHostID IN (SELECT hostID FROM hosts WHERE hostName LIKE 'LAB1-%');The troubleshooting page has the same steps: https://docs.fogproject.org/kb/troubleshooting/fog-agent-troubleshooting
Tom
-
Apologies, I overlooked that in the troubleshooting doc.
I’ll use the provided database edits and await the next release.
Thank you for your continued help!
Adam
-
@AdamC No worries, I’m here to help, and some of what my messages are saying (so I can keep on working) are from AI snippets.
If you see the troubleshooting links and you didn’t know it was there (or it only existed after you proved a problem needed more documentation) my AI agent is actually building KB’s on the fly with the requisite information to help me and the community out.
Thank you!