adrienverge / openfortivpn

Client for PPP+TLS VPN tunnel services
GNU General Public License v3.0
2.64k stars 317 forks source link

ERROR: pppd: Is not setuid-root and the invoking user is not root. #1062

Closed julianov closed 1 year ago

julianov commented 1 year ago

Running openfortivpn on ubuntu server I get this output:

INFO: Connected to gateway. INFO: Authenticated. INFO: Remote gateway has allocated a VPN. ERROR: read: Input/output error INFO: Cancelling threads... ERROR: pppd: Is not setuid-root and the invoking user is not root. INFO: Terminated pppd. INFO: Closed connection to gateway. INFO: Logged out.

pppd is up and running: ps aux | grep pppd root 29585 0.0 0.1 13208 1124 pts/1 S+ 02:42 0:00 grep --color=auto pppd

and it has permission: ls -l $(which pppd) -rwsr-sr-x 1 root dip 378600 Jul 23 2020 /usr/sbin/pppd

DimitriPapadopoulos commented 1 year ago

Use sudo.

See Running as root?

julianov commented 1 year ago

Yes I use sudo and also I'm in the root user. Here is the reason for my question because it is contradicting the error message, since I am using the root user.

I also set pppd with user privileges with:

sudo chmod u+s /usr/sbin/pppd

Also:

~# groups root www-data ppp

~# ls -l /usr/sbin/pppd -rwsr-sr-x 1 root dip 378600 Jul 23 2020 /usr/sbin/pppd

DimitriPapadopoulos commented 1 year ago

It works for me on Ubuntu.

Something's wrong on this system uninstall/reinstall ppp.

$ ls -l /usr/sbin/pppd
-rwsr-xr-- 1 root dip 424512 févr. 24  2022 /usr/sbin/pppd
$ 
julianov commented 1 year ago

Thanks. I alredy did it whit:

$ sudo apt-get remove ppp $ sudo apt-get install ppp

$ ls -l /usr/sbin/pppd -rwsr-xr-- 1 root dip 378600 Jul 23 2020 /usr/sbin/pppd

The problem could be the version right? because Jul 23 2020 brings me here. The problem is that I am using the apt package manager and it is updated

DimitriPapadopoulos commented 1 year ago

I have tested openfortivpn on Ubuntu 18.04, 20.04, 22.04 over time. It works for me. I really don't know.

DimitriPapadopoulos commented 1 year ago

Is this a recent version of openfortivpn?

julianov commented 1 year ago

$openfortivpn --version 1.6.0

It's ubuntu server 18.

Also:

$ sudo pppd Couldn't open the /dev/ppp device: Operation not permitted pppd: Sorry - this system lacks PPP kernel support

but pppd is installed and it's up and running

$ ps aux | grep pppd root 29585 0.0 0.1 13208 1124 pts/1 S+ 02:42 0:00 grep --color=auto pppd

and it has permission: $ ls -l $(which pppd) -rwsr-sr-x 1 root dip 378600 Jul 23 2020 /usr/sbin/pppd

DimitriPapadopoulos commented 1 year ago

Try a recent version (current version is 1.19.0).

DimitriPapadopoulos commented 1 year ago

But then I believe the answer is in this error message:

pppd: Sorry - this system lacks PPP kernel support

Fix the kernel or try reinstalling Ubuntu from scratch.

DimitriPapadopoulos commented 1 year ago

Alternatively, you can give OpenConnect a try, as it embarks its own PPP code and does not rely on the ppp package or PPP support in the kernel.

DimitriPapadopoulos commented 1 year ago

Or try the tun branch which does not depend on PPP any more.

Did any of these help?