We are currently working on an IoT product & having a hard time coming up with a strategy to create a unique password for each device/unit.
I do understand that password based on a function of { serial number, CPU id, MAC address or timestamp } is not acceptable as per cyber practices as these are predictable due to the range constraint.
How about UUID of a partition to be used as password determination parameter as the range/space is 128bits compared to MAC(48bits), CPU ID(64bits) which are predictable given that we know the value of one unit/device, the other unit's ID shall be +/- 1 or 2 ?
I think UUID v4 is safe though duplicability is possible but very rare. But at the same time, I had come across this post mentioning that UUID is not to be used for security capabilities - https://versprite.com/blog/universally-unique-identifiers/
In our product, we are using an RW RootFS(UBIFS) file system and already enforcing the user to change the password upon first-time login. I would make use of a bash script which runs for the first time after factory-programming, will change the password of user 'X' and the script is owned by 'root' user and console login is disabled for 'root' so that nobody will be able to read the script file to understand the logic.
Is this an acceptable approach from cybersecurity point of view?
Any suggestions?