tralph3 / ZeroTier-GUI

A Linux front-end for ZeroTier
GNU General Public License v3.0
211 stars 32 forks source link

Can't get access to ZeroTier #19

Closed KarmaMonk closed 2 years ago

KarmaMonk commented 2 years ago

Hi

I hang in a loop

"This user doesn't have access to ZeroTier!" and "In order to grant myuser access to ZeroTier ..."

As far as I can say

The ZeroTier-Gui runs nice, when I start it as root sudo zerotier-gui

System: Ubuntu 21.10 ZeroTier: 1.8.4 ZeroTier-Gui: 1.3.0

Any Idea?

KarmaMonk

tralph3 commented 2 years ago

Hmm that's weird. There is currently a bug that hangs the program in a similar loop if you never enabled the zerotier-one service previously. Enabling the service creates the token that's needed to run it as a regular user. So the correct steps would be to download both zerotier-one and the gui, enable the service, then run the gui. I need to make a check for that someday.

Anyways, that doesn't seem to be the issue here, since you say the program does run with root, so the service must be enabled. Could you try checking that the service is enabled, removing the token in your home directory, and trying again?

KarmaMonk commented 2 years ago

Yes zerotier-gui runs well as root ... I removed the token and tried it again. But I still stay in the loop ;-)

tralph3 commented 2 years ago

Is there any output when opening the program via terminal?

KarmaMonk commented 2 years ago

$ zerotier-gui => no terminal output

As far as I understand the man-pages of zerotier-cli with the copy of the key I should be able to use zerotier-cli as user without root. but

$ zerotier-cli => output /snap/zerotier/174/usr/sbin/zerotier-cli: authtoken.secret not found or readable in /var/lib/zerotier-one (try again as root)

so it looks like it's not the problem of the zerotier-gui

thx for your support

tralph3 commented 2 years ago

Is the service enabled? Try doing systemctl start zerotier-one. To have it start on startup, systemctl enable zerotier-one.

KarmaMonk commented 2 years ago

sudo systemctl start zerotier-one returns

Failed to start zerotier-one.service: Unit zerotier-one.service is masked.

and

sudo systemctl enable zerotier-one returns

Synchronizing state of zerotier-one.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable zerotier-one
Failed to enable unit: Unit file /etc/systemd/system/zerotier-one.service is masked.
tralph3 commented 2 years ago

Ah, so there's the issue, the service is masked. A masked service is like if it was disabled, but it cannot be enabled by any means, it needs to be unmasked first. Run systemctl unmask zerotier-one, then enable it, then start it. Then try to run the gui.

KarmaMonk commented 2 years ago

Hi Ralph

Unmask didn't solved the problem.

But what solved the problem was to remove the zerotier snap-package and install zerotier via the zerotier-installer from the zerotier.com dowload web-site.

Thanks for all your support. KarmaMonk

tralph3 commented 2 years ago

Oh... snaps strike again! Glad it's working now. I'll close the issue then.