I'm trying to get unique value from Linux server, something like hardware id, for non-root user
I tried to use the mac address of the network interface but in the venet0 interface (virtual network interface) there is no mac address
and the output of the ip addr
command is:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/void
inet 127.0.0.1/32 scope host venet0
inet x.x.x.x/32 brd x.x.x.x scope global venet0:0
inet6 ::2/128 scope global
valid_lft forever preferred_lft foreve
so what is the best way to do that for non-root user and by using build in Linux command that's work on all Linux distributions?