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

    Some Quick Reg questions.

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    2
    4
    306
    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.
    • S
      slipke
      last edited by

      Hi All,

      I have a few questions about FOG.

      1. Is it pssible to set the PC on quick reg to name it to the serial number instead of the mac address?

      2. Is it possible to auto register machines that are not registered?

      TIA.
      Sam

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @slipke
        last edited by

        @slipke said in Some Quick Reg questions.:

        Is it pssible to set the PC on quick reg to name it to the serial number instead of the mac address?

        Yes and no. Is this a native feature of FOG, no. Yes if you have the ability to modify the autoreg script in the inits. Its really not that hard if you understand the basics of bash programming.

        Is it possible to auto register machines that are not registered?

        It depends on what you mean auto register machines that are not registered. If the FOG client is installed and it checks into the FOG server the client will put the registration in a pending state. Understand I don’t use the fog client, but I seen this activity when I was testing the fog client. If you have the registration in a text file you can upload that into the host management page via the web gui.

        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!

        1 Reply Last reply Reply Quote 0
        • S
          slipke
          last edited by

          @george1421 said in Some Quick Reg questions.:

          what you mean auto register machines that are not registered. If the FOG client is installed and it checks into the FOG server the client will put the registration in a pending state. Understand I don’t use the fog client,

          Hey,

          Any tips on where to start with the Auto PC Name script?

          Regards,
          Sam

          george1421G 1 Reply Last reply Reply Quote 0
          • george1421G
            george1421 Moderator @slipke
            last edited by

            @slipke Well if you wanted to do it in the auto reg it will be a bit harder than manual registration, but here is the curl call in the fog.auto.reg program. https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.auto.reg#L73

            Before that curl call you will need to collect the serial number of the machine. The trick is the serial number is saved in the smbios in different locations for different manufacturers.

            If you look at this post it shows you how to get the serial number for the two chassis types I had to interact with: https://forums.fogproject.org/topic/6304/fog-2-0-request-advanced-host-naming/2 It also shows how to create a complex computer name based on several factors on the fly. So you will need to compute/collect the serial number and pass it along with the other arguments to the php file mentioned in the curl call. And then in the php code read that variable and place it in the hostname variable instead of the mac address.

            If you wanted to do this using the manual registration fog.man.reg where it asks for the user to input the host name into $host just use the dmidecode value to copy the serialno value into the host variable. https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.man.reg#L161

            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!

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

            134

            Online

            12.1k

            Users

            17.3k

            Topics

            155.3k

            Posts
            Copyright © 2012-2024 FOG Project