• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. HorizonG
    3. Posts
    H
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 21
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by HorizonG

    • RE: Postdownload scripts and API

      @HorizonG

      I’m making an update to my script.

      If the computer belongs to several groups at the same time, this can cause problems.

      I now return all the groups, then the script selects only the group starting with GROUP_AUTOMATE_ …

      7679ccb4-dc09-4d19-9a3f-49b8039eeaf2-image.png

      This will copy only this folder to the local directory of the client machine : clientfolderpath=“/ntfs/FOG/Sites/$SITE_GROUP”
      136a0ede-7eec-46bc-a1bc-04560b236750-image.png

      Le script

      #!/bin/bash
      
      #Variables
      FOG_HOSTNAME=$hostname
      FOG_API_TOKEN="deleted for privacy reasons"
      FOG_USER_TOKEN="deleted for privacy reasons"
      FOG_SERVER="deleted for privacy reasons"  # Adresse IP ou nom d'hôte de votre serveur FOG
      echo "Serveur FOG: $FOG_SERVER"
      
      
      # Fonction pour appeler l'API FOG
      function invoke_fog_api() {
          local fog_api_token="$1"
          local fog_user_token="$2"
          local fog_server="$3"
          local uri_path="$4"
          local method="${5:-GET}"
          local json_data="$6"
      
          local base_uri="http://$fog_server/fog"
          local uri="$base_uri/$uri_path"
      
          # Construct headers
          local headers=(
              -H "fog-api-token: $fog_api_token"
              -H "fog-user-token: $fog_user_token"
              -H "Content-Type: application/json"
          )
      
          # Make API call and store response in a variable
          if [ "$method" == "GET" ]; then
              response=$(curl -s -X GET "$uri" "${headers[@]}")
          else
              response=$(curl -s -X "$method" "$uri" "${headers[@]}" -d "$json_data")
          fi
      
          echo "$response"
      }
      
      # Fonction pour obtenir les détails de l'hôte
      function get_fog_host() {
          local fog_api_token="$1"
          local fog_user_token="$2"
          local fog_server="$3"
          local fog_hostname="$4"
      
          response=$(invoke_fog_api "$fog_api_token" "$fog_user_token" "$fog_server" "host?name=$fog_hostname")
      
          # Vérifiez si la réponse est vide
          if [ -z "$response" ]; then
              echo "Erreur: La réponse de l'API pour l'hôte est vide."
              return 1
          fi
      
          # Vérifiez la validité du JSON
          if ! echo "$response" | jq . > /dev/null 2>&1; then
              echo "Erreur: La réponse de l'API pour l'hôte n'est pas un JSON valide."
              echo "Réponse brute de l'API: $response"
              return 1
          fi
      
          # Extraire les détails de l'hôte
          local host_info
          host_info=$(echo "$response" | jq --arg hostname "$fog_hostname" '.hosts[] | select(.name == $hostname)')
      
          if [ -z "$host_info" ]; then
              echo "Erreur: Aucun détail trouvé pour l'hôte $fog_hostname."
              return 1
          fi
      
          echo "$host_info"
       }
      
      # Fonction pour obtenir les groupes associés à un hôte
      function get_fog_groups_for_host() {
          local fog_api_token="$1"
          local fog_user_token="$2"
          local fog_server="$3"
          local host_id="$4"
      
          # Récupérer les associations de groupes
          local response
          response=$(invoke_fog_api "$fog_api_token" "$fog_user_token" "$fog_server" "groupassociation")
      
          # Vérifiez la validité du JSON
          if ! echo "$response" | jq . >/dev/null 2>&1; then
              echo "Erreur: La réponse de l'API pour les associations de groupes n'est pas un JSON valide."
              echo "Réponse brute de l'API: $response"
              return 1
          fi
      
          # Extraire les IDs des groupes associés à l'hôte
          local group_ids
          group_ids=$(echo "$response" | jq -r --arg host_id "$host_id" '.groupassociations[] | select(.hostID == ($host_id | tonumber)) | .groupID')
      
          # Récupérer les détails des groupes
          response=$(invoke_fog_api "$fog_api_token" "$fog_user_token" "$fog_server" "group")
      
          # Vérifiez la validité du JSON
          if ! echo "$response" | jq . >/dev/null 2>&1; then
              echo "Erreur: La réponse de l'API pour les groupes n'est pas un JSON valide."
              echo "Réponse brute de l'API: $response"
              return 1
          fi
         
          # Afficher les détails des groupes associés dans un format simple
          local group_ids_array
          group_ids_array=$(echo "$group_ids" | jq -R -s -c 'split("\n") | map(select(length > 0) | tonumber)')
      
          echo "$response" | jq -r --argjson group_ids "$group_ids_array" \
              '.groups[] | select(.id as $id | $group_ids | index($id)) | "\(.id) \(.name)"'
      }
      
      # Fonction pour traiter et afficher les groupes dont le nom commence par GROUP_AUTOMATE_
      function process_fog_groups() {
          local group_data="$1"
      
          echo "Groupes associés à l'hôte (commençant par GROUP_AUTOMATE_) :"
      
          # Initialiser les index
          local group_index=1
          
          # Extraire les groupes et définir les variables d'environnement
          while IFS= read -r line; do
              id=$(echo "$line" | awk '{print $1}')
              name=$(echo "$line" | awk '{$1=""; print $0}' | sed 's/^ *//') # Remove leading spaces from the name
              
              if [[ "$name" == GROUP_AUTOMATE_* ]]; then
                  # Définir les variables d'environnement pour le nom et l'ID du groupe
                  export FOG_GROUP_NAME_$group_index="$name"
                  export FOG_GROUP_ID_$group_index="$id"
                  
                  # Afficher le groupe
                  echo "GROUP NAME = $name"
                  echo "GROUP ID =  $id"
      
                  export FOG_GROUP_NAME_AUTOMATE=$name
                  export FOG_GROUP_NAME_ID=$id
                  
                  # Incrémenter l'index pour le prochain groupe
                  group_index=$((group_index + 1))
              fi
          done <<< "$group_data"
      }
      
      # Fonction principale pour la simulation
      function GetInfo_host() {
          local fog_api_token="$FOG_API_TOKEN"
          local fog_user_token="$FOG_USER_TOKEN"
          local fog_server="$FOG_SERVER"
          local fog_hostname="$FOG_HOSTNAME"
      
          # Obtenez les détails de l'hôte
          local local_host
          local_host=$(get_fog_host "$fog_api_token" "$fog_user_token" "$fog_server" "$fog_hostname")
      
          # Vérifiez si local_host est vide
          if [ -z "$local_host" ]; then
              echo "Erreur: Aucune information sur l'hôte trouvée."
              return 1
          fi
      
          # Obtenez l'ID de l'hôte
          local host_id
          host_id=$(echo "$local_host" | jq -r '.id')
      
          if [ -z "$host_id" ]; then
              echo "Erreur: Impossible d'extraire l'ID de l'hôte."
              return 1
          fi
      
          # Obtenez les groupes associés à l'hôte
          local host_groups
          host_groups=$(get_fog_groups_for_host "$fog_api_token" "$fog_user_token" "$fog_server" "$host_id")
      
          
          # Vérifiez si host_groups est vide
          if [ -z "$host_groups" ]; then
              echo "Erreur: Aucune information sur les groupes trouvée pour l'hôte."
              return 1
          fi
          
          # Traitement des groupes et affichage des détails
          process_fog_groups "$host_groups"
      
          # Accès aux variables d'environnement pour chaque groupe
         for i in $(seq 1 $((group_index - 1))); do
           echo "Nom du groupe $i: ${!FOG_GROUP_NAME_$i}"
           echo "ID du groupe $i: ${!FOG_GROUP_ID_$i}"
          done
      
      
          # Affichage des détails
          echo "---------------------------------------"
          echo "Détails de l'hôte pour: $fog_hostname"
          echo "---------------------------------------"
          echo "Détails de l'hôte récupérés :"
          echo "$local_host"
          echo "---------------------------------------"
          
          # Afficher le contenu de host_groups => ALL GROUPS
          echo "---------------------------------------"
          echo "ALL GROUPS :"
          echo "$host_groups"
          echo "---------------------------------------"
      
      
      
          # Affichage des détails du groupe AUTOMATION
          
      	
         #echo $FOG_GROUP_NAME_AUTOMATE
         #echo $FOG_GROUP_NAME_ID
         
         echo "Détails du groupe automation"
         echo "Nom du groupe: $FOG_GROUP_NAME_AUTOMATE"
         echo "ID du groupe: $FOG_GROUP_NAME_ID"
         echo "---------------------------------------"
      
         # Définir les variables d'environnement pour le nom et l'ID du groupe
         export FOG_GROUP_NAME_AUTOMATE
         export FOG_GROUP_NAME_ID
      
      
      }
      
      GetInfo_host
      
      SITE_GROUP="${FOG_GROUP_NAME_AUTOMATE##*_}"
      echo "Target Site $SITE_GROUP"
      echo "Try to copy this folder if existing : /images/Sites/$SITE_GROUP"
      
      
      # Vérification de la présence du disque système
      echo "Verifying we've found the OS disk"
      if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
          echo "! OS root Not found !"
          # Assurez-vous que 'debugPause' est défini, sinon utilisez une alternative appropriée
          # debugPause
          exit 1
      fi
      echo "Found"
      
      # Préparer le chemin des dossiers
      clientfolderpath="/ntfs/FOG/Sites/$SITE_GROUP"
      remotefolderpath="/images/Sites/$SITE_GROUP"
      
      # Créer le répertoire /tmp/sites s'il n'existe pas déjà
      if [[ ! -d /tmp/sites ]]; then
          mkdir -p /tmp/sites
      fi
      
      # Créer le sous-répertoire avec le nom contenu dans $SITE_GROUP
      if [[ -n "$SITE_GROUP" ]]; then
          mkdir -p "/tmp/sites/$SITE_GROUP"
          echo "Le répertoire /tmp/sites/$SITE_GROUP a été créé."
      else
          echo "Erreur : \$SITE_GROUP est vide. Impossible de créer le répertoire."
          exit 1
      fi
      
      # Créer le répertoire clientfolderpath s'il n'existe pas déjà
      if [[ ! -d "$clientfolderpath" ]]; then
          mkdir -p "$clientfolderpath"
          echo "Répertoire client créé : $clientfolderpath"
      fi
      
      # Copier le dossier avec rsync
      echo -n "In Progress"
      rsync -aqz "$remotefolderpath/" "$clientfolderpath/" >/dev/null 2>&1
      
      if [[ $? -eq 0 ]]; then
          echo "Dossier copié avec succès."
      else
          echo "Erreur : Échec de la copie du dossier."
          exit 1
      fi
      
      debugPause
      
      posted in General
      H
      HorizonG
    • RE: FOG Groups & Memberships

      @HorizonG
      Solution :
      I deleted all my groups and renamed them.
      I think there’s still a bug in the DATABASE

      posted in FOG Problems
      H
      HorizonG
    • RE: FOG Groups & Memberships

      @HorizonG

      I have another problem:

      1. I renamed my group to GROUP1_OLD
      2. I’ve created a new group : GROUP
      3. I deleted all hosts members in GROUP1_OLD
      4. I’ve added the computers to the group: GROUP
        => All my computers are now associated permanently

      Problem : Now, the “GROUP1_OLD” group is self added by 2 devices. Even if I delete it again, it comes back every time. I don’t understand why

      Best Regards

      posted in FOG Problems
      H
      HorizonG
    • FOG Groups & Memberships

      Hello,

      I’ve been having a problem with a PC for a few days, I’ve done several inventories in full registration mode.
      => By naming the computer with the same name

      Now, the computer is a member of the group after registration, but a few minutes later it deletes itself.

      I don’t seem to have this problem with other computers.
      Could you tell me how to solve this problem?

      Thank you

      posted in FOG Problems
      H
      HorizonG
    • RE: Postdownload scripts and API

      @HorizonG

      Sorry for delay.

      Thanks to the code below, I can copy/paste a folder according to the group the computer is in.

      For example :
      I need a folder called “Site1” on a PC depending to a specific group”.

      Please note that the code below was not designed by the FOG developers.
      Execution of this code is at your own risk; be sure to understand and test its impact in your environment before using it in production

      1. First you need to create API/USER Token on FOG Server
      2. Create Group like “Site1”
      3. Create Folder under /images/ => Name folder “Sites” => Chmod 777
      4. Create Child folder (exact name of group) => “Site1”
      5. Need to install “jq” package on FOG server : on Debian dist sudo apt-get install jq
      6. Create New File in posdownloadscripts folder (mine : fog.targetgroup)
      7. This file need to be call in fog.postdownload file with this part : ${postdownpath}/fog.targetgroup

      (Sorry I’m really bad at bash)

      Inside fog.targetgroup file :

      #!/bin/bash
      
      #Variables
      FOG_HOSTNAME=$hostname
      FOG_API_TOKEN="deleted for privacy reasons"
      FOG_USER_TOKEN="deleted for privacy reasons"
      FOG_SERVER="deleted for privacy reasons"  # Adresse IP ou nom d'hôte de votre serveur FOG
      echo "Serveur FOG: $FOG_SERVER"
      
      # Fonction pour appeler l'API FOG
      function invoke_fog_api() {
          local fog_api_token="$1"
          local fog_user_token="$2"
          local fog_server="$3"
          local uri_path="$4"
          local method="${5:-GET}"
          local json_data="$6"
      
          local base_uri="http://$fog_server/fog"
          local uri="$base_uri/$uri_path"
      
          # Construct headers
          local headers=(
              -H "fog-api-token: $fog_api_token"
              -H "fog-user-token: $fog_user_token"
              -H "Content-Type: application/json"
          )
      
          # Make API call and store response in a variable
          if [ "$method" == "GET" ]; then
              response=$(curl -s -X GET "$uri" "${headers[@]}")
          else
              response=$(curl -s -X "$method" "$uri" "${headers[@]}" -d "$json_data")
          fi
      
          echo "$response"
      }
      
      # Fonction pour obtenir les détails de l'hôte
      function get_fog_host() {
          local fog_api_token="$1"
          local fog_user_token="$2"
          local fog_server="$3"
          local fog_hostname="$4"
      
          response=$(invoke_fog_api "$fog_api_token" "$fog_user_token" "$fog_server" "host?name=$fog_hostname")
      
          # Vérifiez si la réponse est vide
          if [ -z "$response" ]; then
              echo "Erreur: La réponse de l'API pour l'hôte est vide."
              return 1
          fi
      
          # Vérifiez la validité du JSON
          if ! echo "$response" | jq . > /dev/null 2>&1; then
              echo "Erreur: La réponse de l'API pour l'hôte n'est pas un JSON valide."
              echo "Réponse brute de l'API: $response"
              return 1
          fi
      
          # Extraire les détails de l'hôte
          local host_info
          host_info=$(echo "$response" | jq --arg hostname "$fog_hostname" '.hosts[] | select(.name == $hostname)')
      
          if [ -z "$host_info" ]; then
              echo "Erreur: Aucun détail trouvé pour l'hôte $fog_hostname."
              return 1
          fi
      
          echo "$host_info"
      }
      
      # Fonction pour obtenir les groupes associés à un hôte
      function get_fog_group() {
          local fog_api_token="$1"
          local fog_user_token="$2"
          local fog_server="$3"
          local host_id="$4"
      
          # Récupérer les associations de groupes
          response=$(invoke_fog_api "$fog_api_token" "$fog_user_token" "$fog_server" "groupassociation")
      
          # Vérifiez si la réponse est vide
          if [ -z "$response" ]; then
              echo "Erreur: La réponse de l'API pour les associations de groupes est vide."
              return 1
          fi
      
          # Vérifiez la validité du JSON
          if ! echo "$response" | jq . > /dev/null 2>&1; then
              echo "Erreur: La réponse de l'API pour les associations de groupes n'est pas un JSON valide."
              echo "Réponse brute de l'API: $response"
              return 1
          fi
      
          # Extraire l'ID du groupe associé
          local group_id
          group_id=$(echo "$response" | jq --arg host_id "$host_id" '.groupassociations[] | select(.hostID == ($host_id | tonumber)) | .groupID')
      
          if [ -z "$group_id" ]; then
              echo "Erreur: Aucun groupe associé trouvé pour l'hôte avec l'ID $host_id."
              return 1
          fi
      
          # Récupérer les détails des groupes
          response=$(invoke_fog_api "$fog_api_token" "$fog_user_token" "$fog_server" "group")
      
          # Vérifiez si la réponse est vide
          if [ -z "$response" ]; then
              echo "Erreur: La réponse de l'API pour les groupes est vide."
              return 1
          fi
      
          # Vérifiez la validité du JSON
          if ! echo "$response" | jq . > /dev/null 2>&1; then
              echo "Erreur: La réponse de l'API pour les groupes n'est pas un JSON valide."
              echo "Réponse brute de l'API: $response"
              return 1
          fi
      
          # Extraire les détails du groupe
          local group_info
          group_info=$(echo "$response" | jq --arg group_id "$group_id" '.groups[] | select(.id == ($group_id | tonumber)) | {id: .id, name: .name}')
      
          if [ -z "$group_info" ]; then
              echo "Erreur: Aucun détail trouvé pour le groupe avec l'ID $group_id."
              return 1
          fi
      
          echo "$group_info"
      }
      
      # Fonction principale pour la simulation
      function GetInfo_host() {
          local fog_api_token="$FOG_API_TOKEN"
          local fog_user_token="$FOG_USER_TOKEN"
          local fog_server="$FOG_SERVER"
          local fog_hostname="$FOG_HOSTNAME"
      
          # Obtenez les détails de l'hôte
          local local_host
          local_host=$(get_fog_host "$fog_api_token" "$fog_user_token" "$fog_server" "$fog_hostname")
      
          # Vérifiez si local_host est vide
          if [ -z "$local_host" ]; then
              echo "Erreur: Aucune information sur l'hôte trouvée."
              return 1
          fi
      
          # Obtenez l'ID de l'hôte
          local host_id
          host_id=$(echo "$local_host" | jq -r '.id')
      
          if [ -z "$host_id" ]; then
              echo "Erreur: Impossible d'extraire l'ID de l'hôte."
              return 1
          fi
      
          # Obtenez les groupes associés à l'hôte
          local host_group
          host_group=$(get_fog_group "$fog_api_token" "$fog_user_token" "$fog_server" "$host_id")
      
          # Vérifiez si host_group est vide
          if [ -z "$host_group" ]; then
              echo "Erreur: Aucune information sur le groupe trouvée pour l'hôte."
              return 1
          fi
      
          # Définir les variables d'environnement pour le nom et l'ID du groupe
          export FOG_GROUP_NAME=$(echo "$host_group" | jq -r '.name')
          export FOG_GROUP_ID=$(echo "$host_group" | jq -r '.id')
      
          # Affichage des détails
          echo "---------------------------------------"
          echo "Détails de l'hôte pour: $fog_hostname"
          echo "---------------------------------------"
          echo "Détails de l'hôte récupérés :"
          echo "$local_host"
          echo "---------------------------------------"
      
          # Affichage des détails du groupe
          echo "Détails du groupe pour l'hôte: $fog_hostname"
          echo "Nom du groupe: $FOG_GROUP_NAME"
          echo "ID du groupe: $FOG_GROUP_ID"
          echo "---------------------------------------"
      }
      
      # Appel de la fonction principale
      GetInfo_host
      
      
      # Vérification de la présence du disque système
      echo "Verifying we've found the OS disk"
      if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
          echo "! OS root Not found !"
          # Assurez-vous que 'debugPause' est défini, sinon utilisez une alternative appropriée
          # debugPause
          exit 1
      fi
      echo "Found"
      
      # Préparer le chemin des dossiers
      clientfolderpath="/ntfs/FOG/Sites/$FOG_GROUP_NAME"
      remotefolderpath="/images/Sites/$FOG_GROUP_NAME"
      
      # Créer le répertoire /tmp/sites s'il n'existe pas déjà
      if [[ ! -d /tmp/sites ]]; then
          mkdir -p /tmp/sites
      fi
      
      # Créer le sous-répertoire avec le nom contenu dans $FOG_GROUP_NAME
      if [[ -n "$FOG_GROUP_NAME" ]]; then
          mkdir -p "/tmp/sites/$FOG_GROUP_NAME"
          echo "Le répertoire /tmp/sites/$FOG_GROUP_NAME a été créé."
      else
          echo "Erreur : \$FOG_GROUP_NAME est vide. Impossible de créer le répertoire."
          exit 1
      fi
      
      # Créer le répertoire clientfolderpath s'il n'existe pas déjà
      if [[ ! -d "$clientfolderpath" ]]; then
          mkdir -p "$clientfolderpath"
          echo "Répertoire client créé : $clientfolderpath"
      fi
      
      # Copier le dossier avec rsync
      echo -n "In Progress"
      rsync -aqz "$remotefolderpath/" "$clientfolderpath/" >/dev/null 2>&1
      
      if [[ $? -eq 0 ]]; then
          echo "Dossier copié avec succès."
      else
          echo "Erreur : Échec de la copie du dossier."
          exit 1
      fi
      
      debugPause
      
      
      posted in General
      H
      HorizonG
    • RE: Postdownload scripts and API

      @HorizonG I found the solution.
      I will share my code tomorrow

      posted in General
      H
      HorizonG
    • Customs Fields / Variables

      Hello,

      Will there be a feature allowing in future versions of FOG that will allow you to create variables?

      For global
      For node
      For site
      For group
      For host (like tags does)

      With the option of using these variables in snapins or APIs…

      Possibility of predefining a default value, defined as Read Only (Example: $FOG_Var = 1)

      Advanced possibility :
      Define this variable in write mode, leaving the value empty (Example: $FOG_Var = ), and send the value to the FOG Client + monitoring script.

      Thank you

      posted in Feature Request
      H
      HorizonG
    • RE: Fog client issue version 0.13.0

      @Tom-Elliott

      You’re right, I created a storage group without making the storage node.

      Here’s what I did:

      1. Storage Management => New Storage Group => Storage_Group
      2. Snapin => New Snapin => Powershel script => Member of Storage_Group

      The second part was to use the

      $ALL_Snapins = Get-FogObject -type object -CoreObject snapin
      $ALL_Snapins.data
      $All_Snapins_Target = ($ALL_Snapin.snapins | where {$_.storagegroupname -like "Storage_Group"}).name
      

      foreach ($ALL_Snapin in $ALL_Snapins)
      {
      Start-FogSnapin -hostID $FOG_HostID -snapinname ($ALL_Snapin.snapins | where {$_.storagegroupname -like “Storage_Group”}).name
      }

      posted in FOG Problems
      H
      HorizonG
    • RE: Fog client issue version 0.13.0

      @Tom-Elliott

      Oh sorry for the misunderstanding, the first capture comes from my 1st server which was called “fogserver.fr” with self-signed CA.

      The second part of the conversation is from my second server.

      However, thanks to you I just understood the BUG.
      The FOG Client stops working when I get a new node.

      In fact, I’d like to hijack the node function so that I can associate snapins only.

      Then I could use the node name and launch snapins via API via postdownload script.

      I’ve just deleted my storage node and the FOG client is working again!

      posted in FOG Problems
      H
      HorizonG
    • RE: Fog client issue version 0.13.0

      @HorizonG

      OS Version :

      PRETTY_NAME=“Debian GNU/Linux 12 (bookworm)”
      NAME=“Debian GNU/Linux”
      VERSION_ID=“12”
      VERSION=“12 (bookworm)”
      VERSION_CODENAME=bookworm
      ID=debian
      HOME_URL=“https://www.debian.org/”
      SUPPORT_URL=“https://www.debian.org/support”
      BUG_REPORT_URL=“https://bugs.debian.org/”

      In /var/log/apache2.log i’ve this error :
      error.png

      posted in FOG Problems
      H
      HorizonG
    • RE: Fog client issue version 0.13.0

      @Tom-Elliott

      Hello,

      I’m glad to have an answer 🙂

      OS version: Debian Bookworm latest version
      FOG server version: 1.5.10.1565
      FOG Client version: 0.13.0
      Server IP: 10.19.0.5
      IP Client (Windows): 10.18.0.4

      Source : git clone https://github.com/FOGProject/fogproject.git

      (I’ve tried to install the previous version, but there’s an update to the latest version every time)

      from : /var/log/php8.2-fpm.log

      php.png

      posted in FOG Problems
      H
      HorizonG
    • RE: Fog client issue version 0.13.0

      Hello,

      • I’ve recreated a new FOG server
      • Recreate a snapin
      • Install FOG Client on machine

      Everything seemed to work at first startup of FOGService, no error.
      I run the snapin, now I get the same problem

      posted in FOG Problems
      H
      HorizonG
    • Fog client issue version 0.13.0

      Hello,

      I’d like to use FOG Client to launch a snapin, but I can’t, there seems to be a communication problem with the server.

      fogclient.png

      I’ve no error in apache logs.

      Secondly, I’d like to know if it’s possible to change the name of the certificates: srvpublic.crt to something else?

      can you help me?

      posted in FOG Problems
      H
      HorizonG
    • RE: Postdownload scripts and API

      @HorizonG said in Postdownload scripts and API:

      Hello,

      I created a function in bash to retrieve the groupid for the postdownload step.

      I use the API to return the groupid from the hostname of the machine. This works fine locally on the server, but when the script is run from the host, it tells me “./fog.api.answer.sh” No such found file or directory

      Location of the file is inside the postdownload folder.

      I need to copy files according to the groupid.

      Do you have a solution?

      @HorizonG said in Postdownload scripts and API:
      1000008158.jpg 1000008159.jpg 1000008160.jpg

      posted in General
      H
      HorizonG
    • Postdownload scripts and API

      Hello,

      I created a function in bash to retrieve the groupid for the postdownload step.

      I use the API to return the groupid from the hostname of the machine. This works fine locally on the server, but when the script is run from the host, it tells me “./fog.api.answer.sh” No such found file or directory

      Location of the file is inside the postdownload folder.

      I need to copy files according to the groupid.

      Do you have a solution?

      posted in General
      H
      HorizonG
    • RE: Can't Change Hostname

      @HorizonG

      Hello Sorry for the late reply, but I’ve deleted the host concerned and the problem is gone.

      posted in FOG Problems
      H
      HorizonG
    • RE: Can't Change Hostname

      Hello @Tom-Elliott

      The message is in French and it says:
      Machine update failed - Please use another name
      Error_Hostname.png

      Another problem I noticed yesterday is that when I want to do a CSV export, I get “Unauthorized”.
      The account used to log in to the WEB GUI interface is part of the “Administrator” group.

      Denied.png

      Best Regards

      posted in FOG Problems
      H
      HorizonG
    • Can't Change Hostname

      Hello Guys,

      I have a problem on a machine inventoried in FOG named POMIG0558v2.
      I can’t change the hostname to POMIG0558, I get this message :
      Update failed choose another name.
      Nowhere else is this name defined.

      is there anything we can do?
      Thank you in advance

      posted in FOG Problems
      H
      HorizonG
    • RE: FOG Golden Image, Sysprep and unattend post install

      Hello @george1421
      Thank you, I’ll try your guide on post install.
      Yesterday, I had tried to update my unattend.xml file present before the capture which did not contain any script call, the file was updating well on the postdownload machine, but I did not have the impression that the script was called (Script name: fog.copyunattend)

      For the moment, it’s here C:\Windows\System32\Sysprep\unattend.xml
      but I’d move it to this location as mentioned: C:\Windows\Panther

      I’d also try renaming the post as explained:
      with the command: sed -i “/ComputerName/s/*/$hostname/g” $unattend >/dev/null 2>&1

      my post install files are called like this :

      . ${postdownpath}fog.copydrivers
      . ${postdownpath}fog.copyscripts
      . ${postdownpath}fog.copyunattend
      . ${postdownpath}fog.setupcmd
      . ${postdownpath}fog.updateunattend
      posted in Windows Problems
      H
      HorizonG
    • FOG Golden Image, Sysprep and unattend post install

      Hello Everyone
      Hello everyone,

      I am new to the forum, I thank in advance those who will be interested in the following post
      I have a question about the post-installation method, specifically about the unattend.xml file.

      1. Step 1 OK : I created an image, which we can call “Golden Image” with an unattend.xml file that I then captured via FOG.

      My unattend file does not contain the command to run a post instlal script like Powershell or SetupComplete.cmd***

      1. Step 2 OK : I then used these 2 guidlines to copy the drivers according to the computer model:

      This method allows me to :

      • Update the unattend file (unattend.xml) here: C:\Windows\System32\Sysprep
      • Drop the drivers folder here: C:\Drivers\
      • Install powershell scripts here: C:\FOG
        Current folder structure :
        C:\FOG
        C:\FOG\Master_Script
        C:\FOG\Scripts
        C:\FOG\Logs

      These scripts contains code to install : Drivers, FOG client,specific configurations

      1. I’d like to know if the unattend file I’m updating via the post-installation method is updated before the OS starting the image that has already been sysprep. So that I can update it dynamically.
        This would also allow me to run my script located at this level: C:\FOG\Master_Script … because I didn’t indicate this in the nitial unattend.xml file.

      2. is it possible to rename automatically (with script?) the machine after post-sysprep initialization, reusing the computer name from Full Inventory ?

      Thank you for your replies

      posted in Windows Problems
      H
      HorizonG
    • 1 / 1