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

Hostname Change on 700+ Workstations

Scheduled Pinned Locked Moved Unsolved
FOG Problems
6
26
5.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.
  • A
    anthony.delarosa
    last edited by Apr 20, 2017, 1:18 AM

    Server
    • FOG Version: 1.3.4
    • OS: CentOS 6.7
    Client
    • Service Version:
    • OS:
    Description

    Hello,

    We have a bit of a big project and that is that we are re-naming all workstations (previously imaged with FOG of course) to fit a better naming convention. Rather than doing this one by one as of course FOG can do with the FOG Hostname Changer, anything that FOG can do so that we can schedule this hostname change on 700+ workstations? Basically at the moment all PCs are named:

    vanprodz440-001, 002, 003 etc…

    We’d like to change that to van-wsz440a-001

    Any help would be greatly appreciated!
    Thanks FOG!

    1 Reply Last reply Reply Quote 0
    • J
      Joe Schmitt Senior Developer
      last edited by Apr 20, 2017, 1:25 AM

      @anthony-delarosa in my opinion your best approach would be to have a script setup or something that changes the hostnames in the SQL database. For example if you wanted to slowly roll out the changes, the script could do 50 at a time, or it could wait until sunday night and then do all of them at once. Once changed in the DB, the fog client would receive the new hostname and apply the change almost instantly.

      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.

      1 Reply Last reply Reply Quote 1
      • W
        Wayne Workman
        last edited by Wayne Workman Apr 20, 2017, 7:26 AM Apr 20, 2017, 1:25 PM

        You can script this as joe said,

        But I think it would be easier to do a host export, modify the export, and then re-inport.

        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!
        Daily Clean Installation Results:
        https://fogtesting.fogproject.us/
        FOG Reporting:
        https://fog-external-reporting-results.fogproject.us/

        A A 2 Replies Last reply Apr 20, 2017, 3:04 PM Reply Quote 0
        • A
          Avaryan @Wayne Workman
          last edited by Apr 20, 2017, 3:04 PM

          @Wayne-Workman said in Hostname Change on 700+ Workstations:

          You can script this as joe said,

          But I think it would be easier to do a host export, modify the export, and then re-inport.

          This is what I would do; however, it might be a good idea to disable the hostname changer module first. This will prevent FOG from immediately changing everything. At the end of the workday, or whenever, you can reenable the module and let FOG do its thing.

          1 Reply Last reply Reply Quote 0
          • A
            anthony.delarosa @Wayne Workman
            last edited by Apr 20, 2017, 4:32 PM

            @Wayne-Workman thank you! I think the easiest is the host export and import! i will test with that and see how it goes. Thank you everyone!

            1 Reply Last reply Reply Quote 0
            • A
              anthony.delarosa
              last edited by Apr 20, 2017, 6:16 PM

              Update:

              I tried exporting and importing and upon importing i get Total Rows, Hosts with a 0

              0_1492712198955_upload-94481746-caba-4051-8ee5-8cfbd52c24cf

              Am I doing something wrong? file is the same

              1 Reply Last reply Reply Quote 0
              • A
                anthony.delarosa
                last edited by Apr 20, 2017, 6:58 PM

                so used a different version of Excel and now I get this error:

                0_1492714644003_upload-1f570fe2-7c1a-4706-9f54-d20b4d9bbb95

                Not sure what tit means by Row #0: 'cause the Excel file starts at Row 1

                T 1 Reply Last reply Apr 20, 2017, 7:30 PM Reply Quote 0
                • T
                  Tom Elliott @anthony.delarosa
                  last edited by Apr 20, 2017, 7:30 PM

                  @anthony.delarosa Did you remove all the hosts first?

                  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

                  A 1 Reply Last reply Apr 20, 2017, 7:34 PM Reply Quote 1
                  • A
                    anthony.delarosa @Tom Elliott
                    last edited by Apr 20, 2017, 7:34 PM

                    @Tom-Elliott hey Tom, remove them? sorry I wasn’t aware of this, I need to go in there and delete all the hosts and then import it again? All I did was export, modify and import the hosts and I keep getting this Row#0 error

                    1 Reply Last reply Reply Quote 0
                    • T
                      Tom Elliott
                      last edited by Apr 20, 2017, 7:35 PM

                      Right.

                      You’re exporting to chagne the names.

                      Then you remove all the hosts are you changing. Reimport.

                      Essentially what you’re importing is failing because it already exists.

                      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

                      A 1 Reply Last reply Apr 20, 2017, 7:37 PM Reply Quote 1
                      • A
                        anthony.delarosa @Tom Elliott
                        last edited by Apr 20, 2017, 7:37 PM

                        @Tom-Elliott ah ok, so i export, make the changes to the 10x (example) hosts, remove all the other ones and re-import that file with 10x hosts? k let me try

                        T 1 Reply Last reply Apr 20, 2017, 7:37 PM Reply Quote 0
                        • T
                          Tom Elliott @anthony.delarosa
                          last edited by Apr 20, 2017, 7:37 PM

                          @anthony.delarosa Only remove the hosts you need to change from FOG.

                          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

                          A 1 Reply Last reply Apr 20, 2017, 9:34 PM Reply Quote 0
                          • A
                            anthony.delarosa @Tom Elliott
                            last edited by Apr 20, 2017, 9:34 PM

                            @Tom-Elliott hey Tom, thanks for that! it worked but after the import the PC (test PC) won’t change it’s hostname automatically. I mean FOG shows the new given name: van-wsz440-147 but the computer Windows 8.1 still has the old name vanprodz440-147 and it’s not rebooting automatically.

                            FOG log file shows:


                            --------------------------------Authentication--------------------------------

                            2017-04-20 2:30 PM Client-Info Version: 0.11.9
                            2017-04-20 2:30 PM Client-Info OS: Windows
                            2017-04-20 2:30 PM Middleware::Authentication Waiting for authentication timeout to pass
                            2017-04-20 2:32 PM Middleware::Communication Download: http://192.168.170.128/fog/management/other/ssl/srvpublic.crt
                            2017-04-20 2:32 PM Data::RSA FOG Server CA cert found
                            2017-04-20 2:32 PM Middleware::Authentication Cert OK
                            2017-04-20 2:32 PM Middleware::Communication POST URL: http://192.168.170.128/fog/management/index.php?sub=requestClientInfo&authorize&newService
                            2017-04-20 2:32 PM Middleware::Response Invalid security token

                            1 Reply Last reply Reply Quote 0
                            • A
                              anthony.delarosa
                              last edited by Apr 20, 2017, 9:42 PM

                              this is what the Hostname Changer shows:


                              --------------------------------HostnameChanger-------------------------------

                              2017-04-20 2:41 PM Client-Info Client Version: 0.11.9
                              2017-04-20 2:41 PM Client-Info Client OS: Windows
                              2017-04-20 2:41 PM Client-Info Server Version: 1.3.4
                              2017-04-20 2:41 PM Middleware::Response ERROR: Unable to get subsection
                              2017-04-20 2:41 PM Middleware::Response ERROR: Object reference not set to an instance of an object.

                              1 Reply Last reply Reply Quote 0
                              • T
                                Tom Elliott
                                last edited by Apr 20, 2017, 10:08 PM

                                @anthony.delarosa said in Hostname Change on 700+ Workstations:

                                2017-04-20 2:32 PM Middleware::Response Invalid security token

                                2017-04-20 2:32 PM Middleware::Response Invalid security token

                                Please go to the hosts you reimported to edit, and click the “Reset encryption data” button for them.

                                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

                                A 2 Replies Last reply Apr 20, 2017, 10:48 PM Reply Quote 1
                                • A
                                  anthony.delarosa @Tom Elliott
                                  last edited by Apr 20, 2017, 10:48 PM

                                  @Tom-Elliott that’s why you’re the creator and i’m just some guy breaking stuff lol ^_^ thanks Tom! with this I’ll be able to complete it by assigning them to a group

                                  1 Reply Last reply Reply Quote 0
                                  • A
                                    anthony.delarosa @Tom Elliott
                                    last edited by Apr 20, 2017, 10:51 PM

                                    @Tom-Elliott by the way, any snap-in that would detect what OU the computer is in and be able to put it back into that same OU after import? it’s a lot to ask but why not lol

                                    T G 2 Replies Last reply Apr 20, 2017, 11:25 PM Reply Quote 0
                                    • T
                                      Tom Elliott @anthony.delarosa
                                      last edited by Apr 20, 2017, 11:25 PM

                                      @anthony.delarosa I’m sure it could be done, but I don’t think anyone has set one up yet.

                                      That said, you can use the FOG Client to join a host to a domain, including the OU.

                                      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
                                      • G
                                        george1421 Moderator @anthony.delarosa
                                        last edited by george1421 Apr 20, 2017, 5:49 PM Apr 20, 2017, 11:48 PM

                                        @anthony.delarosa said in Hostname Change on 700+ Workstations:

                                        @Tom-Elliott by the way, any snap-in that would detect what OU the computer is in and be able to put it back into that same OU after import?

                                        We will have to ask @Joe-Schmitt for confirmation, but a system rename shouldn’t remove the host from AD to rename it. It should just rename it and leave it where the system was in AD/OU. I can understand (re)connecting the target computer to AD may change its OU.

                                        You could also do this with a VBScript or powershell script to rename the system. I’ve done this before with vbscript.

                                        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
                                        • J
                                          Joe Schmitt Senior Developer
                                          last edited by Joe Schmitt Apr 20, 2017, 5:51 PM Apr 20, 2017, 11:50 PM

                                          @george1421 the problem is likely that he is deleting hosts and then importing them (I’m not sure if a CSV export stores this information). This is why I advised directly modifying the SQL database.

                                          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.

                                          G 1 Reply Last reply Apr 20, 2017, 11:54 PM Reply Quote 0
                                          • 1
                                          • 2
                                          • 1 / 2
                                          1 / 2
                                          • First post
                                            18/26
                                            Last post

                                          256

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project