• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Stuffandsht
    3. Posts
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by Stuffandsht

    • RE: Weird Snap-in script behavior

      @george1421 Correct. The image has never been joined to the domain. I also include the fog client in all of my images. I also don’t sysprep the image as I’ve never run into any issues before with it. The main problem here is that fog doesn’t have access to the domain that the computers need joined to. Lets say that in my network, FOG is running on vlan101 with the abc.net domain. After I push the image, I need to manually switch all the computers in the lab over to vlan102 and join them to the def.net domain.

      I have a script that I run as a domain administrator on a domain connected computer in def.net. It generates a djoin.exe provision package for each computer in the lab and I push them to the clients with the snapin pack.

      The problem is that the djoin.exe command in the batch file that the snapin is running just doesn’t execute or something. I can run the script myself using “psexec.exe -i -s cmd.exe” then calling the batch file, and everything works as expected. You can see in the 3rd and 4th block in my first post the difference between FOG running the script and me running the script. When fog does it, it just skips over the djoin line it seems.

      “Edit looking at the post a bit more, you may need to run the djoin command as a user that has rights to add computers to your domain. SYSTEM can’t do that.”
      The user running the script doesn’t need rights in the domain. I’m able to run from the local admin account on the system just fine, as well as the SYSTEM profile. The authorization comes from generating the package from a domain account on another computer.

      posted in Windows Problems
      S
      Stuffandsht
    • Weird Snap-in script behavior

      Hello, I have a strange problem with snap-ins that I’m losing my mind over. I have a situation where I need to push an image to a computer lab and the computers need to be joined to a different domain than the fog server is connected to. I’ve done testing with offline domain joining using djoin.exe and it’s been working well. I push the image to the computer, then use a snapin pack to transfer all of the djoin provisioning files to the lab, then each machine copies the one that it needs to another folder and tries to request the djoin. After I djoin them, I can connect them to the other network, reboot them, then they’ll pull policy and work as expected.

      If I have it copy the following script to the desktop and then I run it as admin, it works fine. I can also use psexec to start cmd as SYSTEM and the script also works. However, when I have FOG execute the script as part of the snapin pack, it just skips over the djoin command. I can see the provisioning package on the C drive and the script on the desktop, but the djoin never goes off.

      cd %~dp0
      xcopy %computername%.txt c:\ /y
      djoin /requestodj /loadfile c:\%computername%.txt /windowspath %systemroot% /localos
      xcopy ~OfflineJoin.bat "C:\users\*******\desktop\" /i /y
      

      To try to see what was going on, I added a redirect to see if djoin was posting any errors or anything

      cd %~dp0>c:\log.txt
      xcopy %computername%.txt c:\ /y>>c:\log.txt
      djoin /requestodj /loadfile c:\%computername%.txt /windowspath %systemroot% /localos >>c:\log.txt
      xcopy ~OfflineJoin.bat "C:\users\********\desktop\" /i /y >>c:\log.txt
      

      The contents of that file are

      C:********-******.txt
      1 File(s) copied
      C:~OfflineJoin.bat
      1 File(s) copied
      

      If I run that script as SYSTEM, I get this

      C:********-******.txt
      1 File(s) copied
      Loading provisioning data from the following file: [c:\********-******.txt].
      
      
      
      The provisioning request completed successfully.
      
      A reboot is required for changes to be applied.
      
      The operation completed successfully.
      
      C:~OfflineJoin.bat
      0 File(s) copied
      

      I tried one more method just to see if I could get it to work, and it also failed. I changed the snapin pack arguments to the following:

      /c "djoin /requestodj /loadfile "[FOG_SNAPIN_PATH]\%computername%.txt" /windowspath %systemroot% /localos"
      

      I’m really at a loss here. I don’t understand why it just won’t run the djoin command as part of the snapin. Does anyone have any suggestions for me?

      posted in Windows Problems
      S
      Stuffandsht
    • 1 / 1