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

Full registration customised

Scheduled Pinned Locked Moved
General
1
2
140
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.
  • J
    jmeyer
    last edited by Apr 2, 2025, 7:48 AM

    Hello,
    I plan to create a custom full registration with only name asked.
    I have read how to edit fog.man.reg but I wonder how i can change an image ID properly to 999 for exemple to set it by default in the registration and avoid to edit file again if I capture a new image.
    I also look for setting a domain name and yes to deploy now instead of the “no” set by default.
    Thank you for your help.

    J 1 Reply Last reply Apr 2, 2025, 8:39 AM Reply Quote 0
    • J
      jmeyer @jmeyer
      last edited by jmeyer Apr 2, 2025, 2:43 AM Apr 2, 2025, 8:39 AM

      Do you think writing this in fog.man.reg after line

      [[ $exists != "#!ok" ]] && handleError "Unable to register host: $exists ($0)\n   Args Passed: $*"
      

      could do it :

      host=""
      imageid="999"
      blDoAD="Y"
      realdoimage=$(echo -n 1 | base64)
      res=""
      user64=$(echo "fog" | tr -d '\012' | base64)
      pass64=$(echo "password" | tr -d '\012' | base64)
      while [[ $res != "#!ok" ]]; do
          echo -n " * Enter hostname for this computer: "
          read host
          if [[ ${#host} -gt 15 ]]; then
              host=${host:0:15}
              echo " | Truncated to 15 characters: $host"
              usleep 2000000
          fi
          host=$(echo $host | base64)
          res=$(curl -Lks --data "host=$host" ${web}service/hostnameloop.php 2>/dev/null)
          [[ $res != "#!ok" ]] && echo "$res"
      done
      
      dots "Attempting to register host"
      res=""
      while [[ -z $res ]]; do
          res=$(curl -Lks --data "sysuuid=${sysuuid}&mac=$mac&advanced=$(echo -n 1 | base64)&host=$host&imageid=$imageid&doimage=$realdoimage&doad=$blDoAD&username=$user64&password=$pass64" ${web}service/auto.register.php 2>/dev/null)
          echo "$res"
          usleep 2000000
      done
      . /bin/fog.inventory
      usleep 2000000
      
      1 Reply Last reply Reply Quote 0
      • 1 / 1
      1 / 1
      • First post
        1/2
        Last post

      181

      Online

      12.0k

      Users

      17.3k

      Topics

      155.2k

      Posts
      Copyright © 2012-2024 FOG Project