• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Windows 10 failing to join domain

Scheduled Pinned Locked Moved
FOG Problems
2
13
2.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    Sebastian Roth Moderator
    last edited by Jan 17, 2022, 11:18 PM

    @chunter2 Great you have looked into this! Thanks a lot. So far I don’t have any idea on why this is the case. But I will take a closer look tomorrow.

    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

    C 1 Reply Last reply Jan 17, 2022, 11:33 PM Reply Quote 0
    • C
      chunter2 @Sebastian Roth
      last edited by Jan 17, 2022, 11:33 PM

      @sebastian-roth Sounds good. One more point of interest. If I remove that if completely the computer gets renamed and joins the domain correctly. I guess leaving it that way will make the client try to change the name and attempt to join the domain over and over again.

      Thanks

      1 Reply Last reply Reply Quote 1
      • S
        Sebastian Roth Moderator
        last edited by Sebastian Roth Jan 18, 2022, 4:59 PM Jan 18, 2022, 10:57 PM

        @chunter2 said in Windows 10 failing to join domain:

        It looks like Environment.MachineName is being updated before the name is actually changed.

        The actual rename is done using Windows API call SetComputerNameEx. You might want to add further debug output to that part of the code to see if something goes wrong here. Searching the web I couldn’t find an obvious issue with that API call yet.

        Have you tried using the hostname command (in cmd prompt) to see if hostname change is reflected there?

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        C 1 Reply Last reply Jan 18, 2022, 11:23 PM Reply Quote 0
        • C
          chunter2 @Sebastian Roth
          last edited by Jan 18, 2022, 11:23 PM

          @sebastian-roth Not sure if I’m reading the code correctly but doesn’t the RenameComputer function in HostnameChanger.cs happen before the RenameComputer function in the WindowsHostName.cs file? If so I think the Environment.MachineName.Equals call is already incorrect meaning it thinks the computer has already been renamed. I thought the RenameComputer function call to the WindowsHostName.cs file was in the try right after the “Renaming host to” log message which in my case I never get to. Hope this makes sense.

          Thanks

          1 Reply Last reply Reply Quote 1
          • S
            Sebastian Roth Moderator
            last edited by Jan 19, 2022, 9:57 PM

            @chunter2 said in Windows 10 failing to join domain:

            Not sure if I’m reading the code correctly but doesn’t the RenameComputer function in HostnameChanger.cs happen before the RenameComputer function in the WindowsHostName.cs file? If so I think the Environment.MachineName.Equals call is already incorrect meaning it thinks the computer has already been renamed.

            Yes you are reading the code correctly. Though my thinking was, that the fog-client running this code in a loop over and over again might do a rename on the first run and then when it gets to the Environment.MachineName.Equals check next time is what we see in the logs you posted. You might want to grab a full log, upload that somewhere and post a link here (or maybe upload in the forum directly if it works).

            I am hoping to get a test setup in the next few days. Though it’s kind of hard for me in between many other things needing my attention and time at the moment. So I appreciate all you do very much! It’s very helpful you started debugging this already.

            I am wondering if you’d be willing and able to come up with a very simple command line tool coded in C# that only does the SetComputerNameEx call. This way we could more easily test this on several different setups and even let other people test to see the differences.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            C 1 Reply Last reply Jan 20, 2022, 3:18 AM Reply Quote 0
            • C
              chunter2 @Sebastian Roth
              last edited by Jan 20, 2022, 3:18 AM

              @sebastian-roth I think I may have tracked down my issue and I think it may be my fault. In my testing I was able to manually change the computer name and then the client would join the domain. I then disconnected from the domain and changed the name back to the original name and rebooted. The client then renamed the computer and joined the domain by itself. I decided to take an image of the machine at this point by first disabling the change hostname and join domain options in the fog web gui for that machine and then rename the computer back again and disconnect from the domain. I then loaded this new image on the same machine after re-enabling the change hostname and join domain in the fog web gui, and loaded it on a second machine and they both renamed and joined properly. My guess is I had never joined the domain with the first image I created. It was as clean an image as I could get. If this makes sense I think this was my issue.

              Thanks

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by Jan 30, 2022, 5:31 PM

                @chunter2 Sorry for the long delay! Seeing that you’ve solved this issue I put this a little further down on the prio list. Good to hear you found what was causing this!!

                I don’t think we’ve ever had anyone run into this issue before. As well I can’t find any reference to the return code 2725 in the forums.

                Maybe we should add this return code to the list of known return codes and spit out an appropriate message for other users running into this as well. What do you think?

                Background: With some more recent Windows 10 build version AD joining seems to have changed a bit. Microsoft tends to push people to use their Azure AD stuff and you need to manually switch over to AD joining. Maybe there something behind the sceen that has changed and is now causing machines to fail a local AD join using the fog-client if they were not joined to a local domain before. Not sure - just a wild guess.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                C 1 Reply Last reply Feb 2, 2022, 5:03 PM Reply Quote 0
                • C
                  chunter2 @Sebastian Roth
                  last edited by Feb 2, 2022, 5:03 PM

                  @sebastian-roth Thanks for the reply. Yes, I think adding an appropriate message would be nice. I’ll keep the image that causes the 2725 error around just in case but at this point I’m not quite sure how or what else to debug. If you have any thoughts in the future and would like me to test just let me know.

                  Thanks

                  1 Reply Last reply Reply Quote 1
                  • S
                    Sebastian Roth Moderator
                    last edited by Sebastian Roth Nov 5, 2022, 9:18 AM Nov 5, 2022, 3:18 PM

                    @chunter2 Finally got back to this one. Doing a little research on the error code 2725 I found the code to mean: The domain controller does not meet the version requirement for this operation.

                    Doesn’t really make sense to me as the very same domain controller succeeds to join that machine via fog-client if it was manually joined before. So I went ahead and found a header file containing the error code as well. It’s in a section called “Error codes used for offline domain join and completion”. I didn’t even know you can do an offline join.

                    So my guess is the machine was in a state were it was trying to do an offline join and failed. So instead of telling the user “The domain controller does not meet the version requirement for this operation” I would rather say something like “Machine seems to be in an offline join state - do a manual join/unjoin of your master before capturing the image”.

                    What do you think?

                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by Dec 12, 2022, 9:29 PM

                      @chunter2 Bump…

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post

                      296

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project