There are some cases when you do not want TeamViewer to keep your old ID. This post will show you how to prevent that default behavior.

In principle, TeamViewer guests and generates your unique ID based on MAC address of some specific interfaces of the PC. Thus, if you change the MAC address, re-configure TeamViewer, the ID will change.

Assume that you already installed TeamViewer. Refer to the installation guide here.

  • Get current teamviewer ID to latterly check if the setup here works as expected: teamviewer info.
  • Stop teamviewer background service (daemon): sudo systemctl stop teamviewerd.
  • Remove teamviewer default configuration: sudo rm /opt/teamviewer/config/global.conf.
  • Inspect current MAC address: sudo ifconfig. The result will look like
enp8s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 30:9c:23:28:66:bf  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xef800000-ef81ffff  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 14602  bytes 2977795 (2.9 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14602  bytes 2977795 (2.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 157.82.205.27  netmask 255.255.248.0  broadcast 157.82.207.255
        inet6 fe80::ff2e:6494:9b88:cd88  prefixlen 64  scopeid 0x20<link>
        ether ac:ed:5c:bd:76:8e  txqueuelen 1000  (Ethernet)
        RX packets 8640  bytes 2050990 (2.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7926  bytes 1975240 (1.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Notice the enp8s0 interface name, TeamViewer guests your previous installation based on this interface's MAC address. Sometimes, it looks at ethN (e.g. eth0) interfaces.

The current MAC address is 30:9c:23:28:66:bf. You choose an arbitrary new MAC address. However, you should not change the first 24-bit of the MAC address. Otherwise, your OS will not be able to recognize your network adapter correctly. Usually I suggest change the last digit from the current MAC address. For e.g. 30:9c:23:28:66:be.

Change the MAC address with following commands. Note: replace enp8s0 and 30:9c:23:28:66:be with appropriate values in your configuration.

sudo systemctl stop networking
sudo ifconfig enp8s0 stop
sudo ifconfig enp8s0 hw ether 30:9c:23:28:66:be
sudo ifconfig enp8s0 start
sudo systemctl start networking

This command largely varies upon your OS

  1. From Ubuntu 19.04, the networking service is no more available. Thus, systemctl stop/start networking does not work.
  2. If the being re-configured interface is a wifi connection. After running the above commands, you need to re-connect via
sudo nmcli radio wifi off
sudo nmcli radio wifi on

3. This configuration is volatile and be restored after reboot. To configure MAC address permanently, refer to this tutorial

4. After all, if the teamviewer ID does not change, you should look at other interfaces and change their MAC address one by one to identify the correct interface

5. I wrote another post on how to change MAC address, you can read for more information (much of the content is coincide with the content in current post).

  • Start docker background service: sudo systemctl start teamviewerd.
  • Re-configure teamviewer: sudo teamviewer passwd my_secret_password.
  • Check new ID: teamviewer info.