D
D
Dmitry Boytsov2021-08-21 12:17:57
linux
Dmitry Boytsov, 2021-08-21 12:17:57

How to remotely change names on a network of 80 PCs?

Installed UBUNTU 20.04 image on 80 PC network using Clonezilla. On the PC there is access via SSH how to change names remotely? Script?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Dmitriev, 2021-08-21
@SignFinder

Script, manual, ansible

D
Drno, 2021-08-21
@Drno

Well, or it should be done at the stage of deploying images from CloneZilla (as they wrote above), there is a parameter - execute the script after deploying the image
Or now already - yes, a script that will go through all IPs via ssh and change names (or will open hostname file and you will enter it yourself

D
Dmitry Krymtsev, 2021-08-21
@krimtsev

From the documentation:
ocs_postrun, ocs_postrun1, ocs_postrun2... is intended for running a command after an operation of saving/restoring an image or cloning disk/partition has been completed. Eg ocs_postrun="/live/image/myscript.sh". If you have more commands to run, you can assign them in the order: ocs_postrun=..., ocs_postrun1=..., ocs_postrun2=.... If more than 10 parameters, remember to use ocs_postrun01, ocs_postrun02..., ocs_postrun11 to make it in order. //NOTE// If you use this parameter, remember not to use "-p reboot" or "-p poweroff" option of ocs-sr. Use "-p true" instead because if "-p reboot" or "-p poweroff" is used, it will reboot or shutdown the system before ocs_postrun related commands are executed. For more info, check this discussion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question