Get Teamviewer Password From Command Line Ubuntu



I wrote the following batch to uninstall TeamViewer 4 and 5, import a reg file with some settings for TeamViewer 6, install TeamViewer 6, extract the ClientID and version from the registry, and then email it to myself as well as send the ID and version to a php script on a website that enters the info into a database for me. 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.

  1. Ubuntu Command Line Programs
  2. Teamviewer Command Line Options

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

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.

Get

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.

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

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

Ubuntu Command Line Programs

Forgotten

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).

Teamviewer Command Line Options

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