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

Snapin error return 1

Scheduled Pinned Locked Moved Unsolved
Mac Problems
4
8
2.2k
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.
  • W
    Warget
    last edited by Jun 9, 2017, 8:30 AM

    Hello everyone,

    I have a little problem with Snapin…
    It returns error 1, it seems to me that it’s a legal problem, does anyone have any idea how to provide run-time scripts?

    1 Reply Last reply Reply Quote 0
    • Q
      Quazz Moderator
      last edited by Jun 9, 2017, 8:57 AM

      Maybe a little bit more information?

      What OS is the FOG server running?

      What version of FOG?

      Which OS are you trying to deploy snapins on?

      What kind of snapin???

      1 Reply Last reply Reply Quote 0
      • W
        Warget
        last edited by Jun 9, 2017, 9:11 AM

        @Quazz said in Snapin error return 1:

        Dans quel système d’exploitation tentez-vous de déployer des snapins?
        Quel type de snapin ???

        Indeed I have not been precise enough:
        FOG: 1.4.0
        OS: Debian 8
        OS client: Mac OS X Sierra

        LOG :
        alt text

        Error:
        I think error come from right

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Jun 9, 2017, 9:34 AM

          @Warget We still need to know more about the actual snapin you are trying to run here?!

          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
          • W
            Warget
            last edited by Jun 9, 2017, 9:37 AM

            @Sebastian-Roth said in Snapin error return 1:

            @Warget Nous devons encore en savoir plus sur le snapin réel que vous essayez de courir ici?

            My snapin is easy it’s a shell script :

            cd ~/Downloads
            echo "password" | sudo -S installer -allowUntrusted -verboseR -pkg "~/Downloads/Imprimantes.pkg" -target /
            

            If I execut by terminal it’s work.

            T 1 Reply Last reply Jun 9, 2017, 11:30 AM Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by Sebastian Roth Jun 9, 2017, 3:50 AM Jun 9, 2017, 9:50 AM

              @Warget Usually real shell scripts start with a shebang (or magic line):

              #!/usr/bin/env bash
              cd ~/Downloads
              echo "password" | sudo -S installer -allowUntrusted -verboseR -pkg "~/Downloads/Imprimantes.pkg" -target /
              

              Give this a try. On the other hand it also could be a problem with the sudo command. When running this script in the terminal by hand you do this in your user context. The fog client executing this same script does it from a different context (account) which might not be allowed to run sudo.

              Anyhow… Having the password in the script is definitely not a good idea. Please read about ‘sudoers’, ‘NOPASSWD’ and such things on the net. This way you should be able to make this work and still have it a little more secure than saving the password in your script file.

              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 1
              • T
                Tom Elliott @Warget
                last edited by Jun 9, 2017, 11:30 AM

                @Warget I could be wrong, but maybe your implicit use of where the pkg file is located is causing issues?

                The client, when on Linux or macOS systems, runs at the root user, where as you’re running this manually, it’s running as your logged in user.

                In other words:
                ~/Downloads/Imprimantes.pkg when you manually run it is located as:
                /Users/<yourloggedinusername>/Downloads/Imprimantes.pkg, but as the Client runs it is: /root/Downloads/Imprimantes.pkg

                Mind you this would cause issues, particularly, if Imprimantes.pkg doesn’t exist on /root/Downloads/

                This all said, there really isn’t any need to run the sudo portion as the FOG Client runs as the root 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.

                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 2
                • S
                  Sebastian Roth Moderator
                  last edited by Jun 22, 2017, 7:54 AM

                  @Warget Is this snapin issue solved?

                  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

                  155

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project