The Pi has a unique Serial Number. This should uniquely identify each Pi. The Ethernet MAC is related to this, and similarly unique.
Any other solution, such as creating files or hostname involves storing something on the SD Card, so at best this identifies the SD Card. This may be what you want if you want to tie user data to the ID.
Edit Based on your comment there are still many answers, depending on what you want to achieve.
- If you want to distinguish users - give them a unique
username
. This is the traditional 'NIX approach. - If you want to distinguish
users machines on a network give each a unique
hostname
.
Either or these will give a visually distinct prompt, and you can combine both.