Hi all,
Could someone enlighten me,
How can I get a piece of string , say 6 characters mix of alpha & numbers,
only unique to that platform ?
Or at least some concept how can I do that?
I need to auto-generate a hostname,
in which even after multiple reboots,
Or re-installation of software,
this piece of code shouldn't generate a new name.
Generating out of MAC address is 1 way,
but it gets complicated especially in Python 2.7 getting to know which network card is active and so on so forth.
Looking for something easy and straight-forward.
Could someone enlighten me,
How can I get a piece of string , say 6 characters mix of alpha & numbers,
only unique to that platform ?
Or at least some concept how can I do that?
I need to auto-generate a hostname,
in which even after multiple reboots,
Or re-installation of software,
this piece of code shouldn't generate a new name.
Generating out of MAC address is 1 way,
but it gets complicated especially in Python 2.7 getting to know which network card is active and so on so forth.
Looking for something easy and straight-forward.