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

MAC address as host name - auto populate, etc.

Scheduled Pinned Locked Moved
FOG Problems
4
26
13.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.
  • R
    rhythmtone
    last edited by Jun 10, 2014, 5:37 PM

    Thanks for the reply,
    It seems like putting the serial in “Computer Description” might be better than trying to put it in the hostname, so I guess that would be my goal, yes. In simpler terms, getting the serial into Active Directory in some form is the MAIN goal, and “Computer Description” would seem to be the best and more appropriate place/way for this, rather than the hostname.

    The problem with doing it via VBScript snapin is that is another thing to write/manage/push/worry about, and I would rather just have it be mechanized as part of the FOG Service. However, I will certainly try it that way as time allows.

    Would a VBScript pull the serial from the SQL database, or from the local machine? Off the top of my head, I cannot remember if Windows stores the motherboard serial somewhere, but you would think so…

    Also, cloning machines with/without sysprep might cause a VBScript to pull an incorrect serial if it’s pulling it from the local machine.

    Thanks,
    D.L.

    1 Reply Last reply Reply Quote 0
    • C
      Cory Landry
      last edited by Jun 10, 2014, 7:26 PM

      We implemented this last year so some of the information may have been changed with out being documented, but this is the script we used. Keep in mind this only updates the description in AD not on the computer itself.

      You also have to change ad permissions.

      Open ADUC
      Right click on domain select properties -> security -> advanced -> add
      Type Authenticated Users -> OK -> properties
      Change [U]Apply to:[/U] to [U]Descendant Computer Objects[/U] and allow Write Description

      [CODE]DIM objSysInfo, objWMI, objComputer
      SET objWMI = GetObject(“winmgmts:{impersonationLevel=impersonate}!\.\root\cimv2”)

      'Get OU
      SET objSysInfo=createobject(“adsysteminfo”)

      'Set computer description; will not update field if description is current or if it starts with an “!”
      FOR EACH objSMBIOS IN objWMI.ExecQuery(“Select * from Win32_SystemEnclosure”)
      serviceTag = replace(objSMBIOS.SerialNumber, “,”, “.”)
      manufacturer = replace(objSMBIOS.Manufacturer, “,”, “.”)
      NEXT
      FOR EACH objComputer IN objWMI.ExecQuery(“Select * from Win32_ComputerSystem”)
      model = trim(replace(objComputer.Model, “,”, “.”))
      NEXT
      SET objComputer = GetObject(“LDAP://” & objSysInfo.ComputerName)
      newDescription = “(” & serviceTag & " / " & model & “)”
      IF NOT objComputer.Description = newDescription AND NOT left(objComputer.Description,1) = “!” THEN
      objComputer.Description = newDescription
      objComputer.SetInfo
      END IF[/CODE]

      1 Reply Last reply Reply Quote 0
      • J
        Junkhacker Developer
        last edited by Jun 10, 2014, 7:31 PM

        you might find this link interesting [url]http://deployhappiness.com/find-serial-numbers-in-active-directory/[/url]

        signature:
        Junkhacker
        We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

        1 Reply Last reply Reply Quote 0
        • R
          rhythmtone
          last edited by Jun 10, 2014, 8:36 PM

          Thanks for the replies,
          These are both good directions to point, and thank you for the suggestions. If/when I have time to try these, I will…

          However, it would still be better if it was integrated as part of the FOG Service, or the main FOG installation, IMHO. Of course this will sound lazy, but having the work already done and having it mechanized, automated, and in the background is always better.

          That it probably the single greatest thing about FOG and the FOG Service, it WORKS - yes, there are ways to do everything that FOG and the FOG Service do independently, on your own, but I would never be able to get them working. The deployhappiness.com link illustrates this perfectly as the comment section is full of folks having trouble with it, trying to get it to work, etc. and undoubtedly that would be me as well and I would probably just give up before I got it working…

          That’s why you guys are developers and I’m just a user, haha!

          Thanks again for all of your work and help,
          D.L.

          1 Reply Last reply Reply Quote 0
          • R
            rhythmtone
            last edited by Jun 11, 2014, 5:47 PM

            I just wanted to add that I do understand that basic scripting is not the same as developing, and is generally part of the job, but I’m sure that I will have some trouble getting this to work.

            I will try it and report back, thanks again for all of the assistance and the great work on FOG,
            D.L.

            1 Reply Last reply Reply Quote 0
            • T
              Tom Elliott
              last edited by Jun 11, 2014, 5:49 PM

              If you need help, Convo me (not everybody all at once), but I can try to assist and direct where you may need it.

              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
              • 1
              • 2
              • 2 / 2
              2 / 2
              • First post
                21/26
                Last post

              262

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project