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

    snappin doesn't work

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    6
    39
    9.3k
    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.
    • L
      lebrun78 @Zaarin
      last edited by

      @Zaarin
      Fog client is running in his folder, isn’t it ?

      Fog Version: Fog 1.5.10
      Server OS: AlmaLinux release 8.8

      ZaarinZ Wayne WorkmanW 2 Replies Last reply Reply Quote 0
      • ZaarinZ
        Zaarin @lebrun78
        last edited by

        @lebrun78
        Powershell has it’s own environment and for this reason, I compiled ps1 to exe to avoid path problem for an old project.

        My script just updated the background on the Windows 7 lock screen.

        Sorry.

        1 Reply Last reply Reply Quote 0
        • Wayne WorkmanW
          Wayne Workman @lebrun78
          last edited by Wayne Workman

          @lebrun78 There is a Powershell template. Pick the template, upload the powershell file. That’s all you have to do when creating a snapin.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          L 1 Reply Last reply Reply Quote 0
          • L
            lebrun78 @Wayne Workman
            last edited by

            @Wayne-Workman
            that’s what I did, I think ?
            alt text

            Fog Version: Fog 1.5.10
            Server OS: AlmaLinux release 8.8

            1 Reply Last reply Reply Quote 0
            • L
              lebrun78
              last edited by

              could I make log more verbose ?

              Fog Version: Fog 1.5.10
              Server OS: AlmaLinux release 8.8

              Tom ElliottT 1 Reply Last reply Reply Quote 0
              • Tom ElliottT
                Tom Elliott @lebrun78
                last edited by

                @lebrun78 It’s not verbosity that will get you an answer.

                Can you actually upload the ps1 script here? From what I can see your client is restarting after a period of time.

                It get’s the point of displaying the Snapin, the client appears to restart, then it get’s back to the same point and ends on “Snapin starting”.

                This leads me to think there’s something in the snapin causing issues. Maybe from the PS1 script?

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                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

                L 1 Reply Last reply Reply Quote 0
                • L
                  lebrun78 @Tom Elliott
                  last edited by

                  @Tom-Elliott
                  I manually restart it while the task is still marked as running

                  Fog Version: Fog 1.5.10
                  Server OS: AlmaLinux release 8.8

                  Tom ElliottT L 2 Replies Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott @lebrun78
                    last edited by

                    @lebrun78 Well, if it’s “installing MS Office, as the file kind of suggests” I’m guessing the PS1 has to either download the installer files and/or start the installer files across a network share. Are you setting the installation in a “silent” mode? Does running it manually on the command line cause you to do user inputs or not?

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                    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

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      lebrun78 @lebrun78
                      last edited by

                      Should it be a path problem ? Should fog client install the script from c:\program file x86\fog\tmp ?

                      Fog Version: Fog 1.5.10
                      Server OS: AlmaLinux release 8.8

                      1 Reply Last reply Reply Quote 0
                      • L
                        lebrun78 @Tom Elliott
                        last edited by

                        @Tom-Elliott
                        No because it was not working with office2010, I try it with a script to install videolan player which is very lighter

                        Fog Version: Fog 1.5.10
                        Server OS: AlmaLinux release 8.8

                        1 Reply Last reply Reply Quote 0
                        • Tom ElliottT
                          Tom Elliott
                          last edited by

                          So what is the point of the fog_instoffice2010.ps1 file?

                          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                          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
                          • L
                            lebrun78
                            last edited by

                            fog_inst_office2010.ps1 is a script to mount p: with authentication and call a bat script

                            Fog Version: Fog 1.5.10
                            Server OS: AlmaLinux release 8.8

                            L 1 Reply Last reply Reply Quote 0
                            • L
                              lebrun78 @lebrun78
                              last edited by lebrun78

                              here is this extract of windows powershell log in windows events viewer
                              1st run by snap in:
                              alt text

                              2nd by manual command line that works:
                              alt text

                              I don’t understand !

                              Witch trigger mark snapin task ended in web console ?

                              Fog Version: Fog 1.5.10
                              Server OS: AlmaLinux release 8.8

                              1 Reply Last reply Reply Quote 0
                              • J
                                Joe Schmitt Senior Developer
                                last edited by

                                @lebrun78 snapins run as SYSTEM (this is like a limited root on unix). If a script works when run manually but not as a snapin, then your script is not SYSTEM compliant. Usually its an issue when someone tries to use network shares, which it appears you are doing. SYSTEM is an non domain user, so if your network share requires someone to be domained user to access it, that’s one potential issue. Ultimately this is a network share issue, and without see exactly how you are mounting / using it, we cannot help.

                                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                L 1 Reply Last reply Reply Quote 0
                                • Wayne WorkmanW
                                  Wayne Workman @lebrun78
                                  last edited by Wayne Workman

                                  @Joe-Schmitt he’s using the powershell script to mount & then call another script. But yes, how it’s being done matters and we need to know.

                                  @lebrun78 said in snappin doesn't work:

                                  hello
                                  -programme is an option of the script fog_inst_office2010.ps1

                                  fog_inst_office2010.ps1 is a script to mount p: with authentication and call a bat script

                                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                                  Daily Clean Installation Results:
                                  https://fogtesting.fogproject.us/
                                  FOG Reporting:
                                  https://fog-external-reporting-results.fogproject.us/

                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    lebrun78
                                    last edited by

                                    Here is the power shell code.
                                    We have no domain

                                    param (
                                        [String] $programme
                                    )
                                    $user = "install"
                                    $pwd = "1234500000000000000000000000000000000000000000000000000000AAAA="
                                    $serveur = "\\fileserver.istic.univ-rennes1.fr\partage"
                                    $cert = $(Get-ChildItem cert:\CurrentUser\TrustedPublisher | where {$_.Subject -eq "CN=ISTIC/ESIR Signature"})
                                    $tab_key = @()
                                    foreach ($i in $cert.SerialNumber.ToCharArray()){$tab_key += [convert]::ToInt16($i,16)}
                                    $password = ConvertTo-SecureString -key $tab_key -string $pwd
                                    $credential = New-Object -TypeName system.management.Automation.PSCredential -ArgumentList $user, $password
                                    
                                    #net use p: $dossier_partage /p:n /u:$($credential.GetNetworkCredential().username) $($credential.GetNetworkCredential().password)
                                    if (!(Test-Path -Path p:)){
                                        $net = new-object -ComObject WScript.Network
                                        $net.MapNetworkDrive("p:", $serveur, $false, $credential.GetNetworkCredential().UserName,$credential.GetNetworkCredential().password)
                                    }
                                    
                                    #lorsque l'on lance un script powershell, si il y avait des espaces dans le nom, cela ne passait pas 
                                    #lorsque l'on faisait un start-process et ce nom en argument. Donc on utilise plutot le nom court
                                    $prog_court = (New-Object -ComObject Scripting.FileSystemObject).GetFile($programme).ShortPath
                                    					
                                        write-host "$(hostname):Dossier de l'installer $($dossier_installer)"
                                    	write-host ""
                                    	write-host "$(hostname):lancement de $($programme)"
                                        write-host "$(hostname):lancement de $($prog_court)"
                                    
                                    #start-process -FilePath $programme -wait -NoNewWindow
                                    $dossier_installer = $((get-item -path $programme).DirectoryName)
                                    
                                    if (!(Test-Path -Path "$dossier_installer\logs_fog_install")){New-Item -ItemType directory -Path "$dossier_installer\logs_fog_install"}
                                    $extension = (get-item -path $programme).Extension
                                    if ($extension -eq ".bat" -or $extension -eq ".cmd") {
                                    	#write-host "$env:COMPUTERNAME:C'est un script bat"
                                    	start-process -FilePath $prog_court -wait -NoNewWindow -RedirectStandardOutput ${dossier_installer}\logs_fog_install\${env:COMPUTERNAME}_log.txt -RedirectStandardError ${dossier_installer}\logs_fog_install\${env:COMPUTERNAME}_error.txt
                                    }
                                    if ($extension -eq ".ps1") {
                                    	#write-host "$env:COMPUTERNAME:C'est un script powershell"
                                    	$policy = Get-ExecutionPolicy
                                    	Set-ExecutionPolicy AllSigned
                                    	start-process -FilePath PowerShell -Arg $prog_court -wait -NoNewWindow -RedirectStandardOutput ${dossier_installer}\logs_fog_install\${env:COMPUTERNAME}_log.txt -RedirectStandardError ${dossier_installer}\logs_fog_install\${env:COMPUTERNAME}_error.txt
                                    	Set-ExecutionPolicy $policy
                                    }
                                    
                                    #net use p: /delete
                                    $net.RemoveNetworkDrive("p:")
                                    
                                    # SIG # Begin signature block
                                    # MIIECAYJKoZIhvcNAQcCoIID+TCCA/UCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
                                    # gjcCAQSgWzBZM888888888888888888888888888888888888888sITrck0sYpfvNR
                                    # AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUtCNKzTzpJy5lu9elxjbUrgg6
                                    # IN6gggIiMIICHjCCAYugAwIBAgIQ1lzBhsDQvaJIVRttke8WMjAJBgUrDgMCHQUA
                                    # MBwxGjAYBgNVBA0000000000000000000000000000000MDEyMDE0NDkzMloX
                                    # DTM5MTIzMTIzNTk1OVowHzEdMBsGA1UEAxMUSVNUSUMvRVNJUiBTaWduYXR1cmUw
                                    # gZ8wDQY555555555555555555555555555555555555555555555555555555eWWBCfR
                                    # uEdEBxWynlykfLTyteMRiJO3TywGgvhoGX0V+hZpUBeqQLD7q3Qs0npuhWr9COSt
                                    Insert Code Here
                                    

                                    Fog Version: Fog 1.5.10
                                    Server OS: AlmaLinux release 8.8

                                    JJ FullmerJ 1 Reply Last reply Reply Quote 0
                                    • L
                                      lebrun78 @Joe Schmitt
                                      last edited by

                                      @Joe-Schmitt ght.
                                      I changed the user account joined to fogservice and it works now.
                                      Install is now the user account used by fogservice

                                      Thanks

                                      Fog Version: Fog 1.5.10
                                      Server OS: AlmaLinux release 8.8

                                      Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                                      • Wayne WorkmanW
                                        Wayne Workman @lebrun78
                                        last edited by

                                        @lebrun78 said in snappin doesn't work:

                                        I changed the user account joined to fogservice and it works now.
                                        Install is now the user account used by fogservice

                                        So you changed the user account to SYSTEM ?

                                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                                        Daily Clean Installation Results:
                                        https://fogtesting.fogproject.us/
                                        FOG Reporting:
                                        https://fog-external-reporting-results.fogproject.us/

                                        L 1 Reply Last reply Reply Quote 0
                                        • L
                                          lebrun78 @Wayne Workman
                                          last edited by

                                          @Wayne-Workman
                                          I changed the account associated to fogesevrvice from local system account to install
                                          alt text

                                          Fog Version: Fog 1.5.10
                                          Server OS: AlmaLinux release 8.8

                                          1 Reply Last reply Reply Quote 0
                                          • J
                                            Joe Schmitt Senior Developer
                                            last edited by Joe Schmitt

                                            @lebrun78 that indicates it’s a network share permission issue or a script issue, as we have been saying. While that may work, you have to alter every machine and is a work-a-round for the underlying issue. If its a network share permission, fixing the network share permissions to allow for SYSTEM access (even if just to a single public folder) is the route we recommend. If its an issue with how you mount/decrypt your share, then it just needs to be made SYSTEM compatible. The client was built with SYSTEM permissions in mind, and therefore I cannot vouch for the security, or functionality, of the client running as a different user.

                                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                            L 1 Reply Last reply Reply Quote 1
                                            • 1
                                            • 2
                                            • 2 / 2
                                            • First post
                                              Last post

                                            157

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project