You are not logged in.
Hi,
I'm using pptpclient for establish my PPTP connections. I would like to be able to start up/shut down my PPTP connections without the need to write 'sudo' every time. So, I set permissions for files /usr/bin/pppd and /usr/bin/pptp to 4555. Now, when i start up the connection by runnig command pon <TUNNEL>, i get an error "RTNETLINK answers: Operation not permitted":
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
RTNETLINK answers: Operation not permitted
CHAP authentication succeeded
local IP address 91.187.17.232
remote IP address 91.187.12.1
Despite this, the connection establishes and everything works fine.
So, i have two questions:
1. How can i fix this error?
2. Is there another (better) way to run pon/poff by a normal user?
Additional information
journalctl:
июл 18 22:08:14 nightwolf_linux sudo[3182]: nightwolf : TTY=pts/0 ; PWD=/etc/ppp ; USER=root ; COMMAND=/usr/bin/pon ADSL
июл 18 22:08:14 nightwolf_linux sudo[3182]: pam_unix(sudo:session): session opened for user root by (uid=0)
июл 18 22:08:14 nightwolf_linux pppd[3187]: pppd 2.4.7 started by root, uid 0
июл 18 22:08:14 nightwolf_linux pppd[3187]: Using interface ppp0
июл 18 22:08:14 nightwolf_linux pppd[3187]: Connect: ppp0 <--> /dev/pts/1
июл 18 22:08:14 nightwolf_linux pptp[3188]: anon log[main:pptp.c:333]: The synchronous pptp option is NOT activated
июл 18 22:08:14 nightwolf_linux pptp[3199]: anon log[ctrlp_rep:pptp_ctrl.c:258]: Sent control packet type is 1 'Start-Control-Connection-Request'
июл 18 22:08:14 nightwolf_linux pptp[3199]: anon log[ctrlp_disp:pptp_ctrl.c:758]: Received Start Control Connection Reply
июл 18 22:08:14 nightwolf_linux pptp[3199]: anon log[ctrlp_disp:pptp_ctrl.c:792]: Client connection established.
июл 18 22:08:15 nightwolf_linux pptp[3199]: anon log[ctrlp_rep:pptp_ctrl.c:258]: Sent control packet type is 7 'Outgoing-Call-Request'
июл 18 22:08:15 nightwolf_linux pptp[3199]: anon log[ctrlp_disp:pptp_ctrl.c:877]: Received Outgoing Call Reply.
июл 18 22:08:15 nightwolf_linux pptp[3199]: anon log[ctrlp_disp:pptp_ctrl.c:916]: Outgoing call established (call ID 0, peer's call ID 12052).
июл 18 22:08:15 nightwolf_linux pptp[3199]: anon log[ctrlp_disp:pptp_ctrl.c:980]: PPTP_SET_LINK_INFO received from peer_callid 41644
июл 18 22:08:15 nightwolf_linux pptp[3199]: anon log[ctrlp_disp:pptp_ctrl.c:983]: send_accm is 00000000, recv_accm is FFFFFFFF
июл 18 22:08:15 nightwolf_linux pptp[3199]: anon warn[ctrlp_disp:pptp_ctrl.c:986]: Non-zero Async Control Character Maps are not supported!
июл 18 22:08:16 nightwolf_linux pppd[3187]: CHAP authentication succeeded
июл 18 22:08:16 nightwolf_linux pppd[3187]: local IP address 91.187.5.244
июл 18 22:08:16 nightwolf_linux pppd[3187]: remote IP address 91.187.0.1
1. Since there is a better way to run pon/poff by an ordinary user (see p.2), the question about the error is no longer relevant.
2. Instead of changing permisions for pppd and pptp, it is better to create an alias (e.g. alias='sudo pon <TUNNEL>'), and configure sudo to allow pon/poff without a password.
Thanks tomk and Raynman for help.
Last edited by ows_nightwolf (2015-07-20 08:01:14)
Offline
If typing 'sudo' is your only issue, just create an alias.
Don't mess with the permissions of files installed by pacman - your changes will be reverted next time the package is upgraded.
Offline
Tomk, thanks for your reply, you gave me useful information. But besides typing 'sudo', i don't want to enter my password every time. If I understand correctly, the only way to do this through aliases - is to create a new alias for: "echo <my-password> | sudo -S pon <tunnel>". It's a solution, but in this case my password stored somewhere (for example, in ~/.bashrc) as plain text, available for read, and it's not good, so it doesn't quite suit me.
Last edited by ows_nightwolf (2015-07-19 07:37:18)
Offline
Then configure sudo to allow pon/poff without a password?
Offline
Raynman, thanks, exactly what I need!
Offline