vopono icon indicating copy to clipboard operation
vopono copied to clipboard

Hoping for a little help getting vopono.service working... :confused:

Open 5p4r74cu5 opened this issue 2 years ago • 5 comments

Hey everyone, I'm relatively new to linux :woman_astronaut: so please excuse my ignorance.

I'm trying to setup a root service and haven't been able to get it working. Vopono runs fine when I execute it directly in the terminal, and I can get the service running fine; it just doesn't seem to open qbittorrent as intended. Any suggestions would be appreciated :-)

[Unit]
Description=Vopono
After=network.target
Before=

[Service]
ExecStart=/usr/bin/vopono -v exec -k -f 9091 --protocol openvpn --provider protonvpn --server hong_kong-hk qbittorrent
ExecReload=
Type=simple
Restart=on-failure

[Install]
WantedBy=default.target
RequiredBy=network.target

5p4r74cu5 avatar Dec 19 '22 14:12 5p4r74cu5

I think at the moment the only way to run it as your user with systemd, is to run it as a user service, and then enable passwordless sudo for the user.

But you might want to check the systemctl status of the service and journalctl for any error messages.

jamesmcm avatar Dec 20 '22 11:12 jamesmcm

Ah I see, hmmm... how risky, security wise, is it to have a user with passwordless sudo if I'm only using that user to run the vopono service.

5p4r74cu5 avatar Dec 21 '22 09:12 5p4r74cu5

It is possible for systemd services run as root to execute as a user by putting Environment=SUDO_USER=<user> under the "[Service]" section.

SocietasCooperationis avatar Jan 30 '23 20:01 SocietasCooperationis

It is possible for systemd services run as root to execute as a user by putting Environment=SUDO_USER=<user> under the "[Service]" section.

Thanks for the suggestion, it's taken me a while to get around to trying it! I get this issue when trying it, and am not sure what to do about it.

Jul 03 13:43:33 P52 sudo[143262]: pam_unix(sudo:auth): conversation failed
Jul 03 13:43:33 P52 sudo[143262]: pam_unix(sudo:auth): auth could not identify password for <user>

Any suggestions? I did some googling but couldn't figure out what the right approach is.

5p4r74cu5 avatar Jul 03 '23 03:07 5p4r74cu5

Having the same pam_unix error. Are there any solutions here? It's weird that it's still trying to authenticate the password even though it's a root service. What's going on here?

musjj avatar Mar 12 '24 19:03 musjj