Re: pppd changes permission to /dev/ttyS1 (my modem)
> >
> > Wrong. That would allow all those users to snoop on each other's
> > ppp connections, since they get read-access to the modem port.
>
> I'm the only user - it's my home computer so I don't care.
>
> > The correct group is dip.
>
> Wrong again ;)
> At least with wvdial. With pon/poff it's all ok. i don't have to
> be in group dialout nor have g+w permission on /dev/ttyS1. If
> /dev/ttyS1 is g+w while starting pppd, pppd removes it and puts
> back on exit.
> But if i use wvdial, /dev/ttyS1 has to be group writable:
>
> SeLeR:/home/piotr# l /dev/ttyS1
> crw-r----- 1 root dialout 4, 65 wrz 5 22:41 /dev/ttyS1
> piotr@SeLeR:~/download/5$ wvdial <<<<----------
> --> WvDial: Internet dialer version 1.41
> --> Cannot open /dev/ttyS1: Permission denied
>
> If it has g+w, wvdial is working ok. It connects to my IP and then
> starts pppd, and pppd removes +w. But I think it's not ending pppd
> properly. This is from syslog:
>
> pppd started by pon and ended by poff:
> Sep 5 23:00:24 SeLeR pppd[938]: Terminating on signal 15.
> Sep 5 23:00:24 SeLeR pppd[938]: sent [LCP TermReq id=0x2 "User request"]
> Sep 5 23:00:25 SeLeR pppd[938]: Script /etc/ppp/ip-up finished (pid 940),
> stat$Sep 5 23:00:25 SeLeR pppd[938]: Script /etc/ppp/ip-down started (pid
> 970)
> Sep 5 23:00:26 SeLeR pppd[938]: Script /etc/ppp/ip-down finished (pid
> 970), st$Sep 5 23:00:27 SeLeR pppd[938]: sent [LCP TermReq id=0x3 "User
> request"]
> Sep 5 23:00:30 SeLeR pppd[938]: sent [LCP TermReq id=0x4 "User request"]
> Sep 5 23:00:33 SeLeR pppd[938]: sent [LCP TermReq id=0x5 "User request"]
> Sep 5 23:00:36 SeLeR pppd[938]: sent [LCP TermReq id=0x6 "User request"]
> Sep 5 23:00:39 SeLeR pppd[938]: Hangup (SIGHUP)
> Sep 5 23:00:39 SeLeR pppd[938]: Modem hangup
> Sep 5 23:00:39 SeLeR pppd[938]: Connection terminated.
> Sep 5 23:00:39 SeLeR pppd[938]: Connect time 0.1 minutes.
> Sep 5 23:00:39 SeLeR pppd[938]: Sent 97 bytes, received 76 bytes.
> Sep 5 23:00:40 SeLeR pppd[938]: Exit.
>
Correct me if I am wrong. I notice that you have issued
your "wvdial" command as a user. "wvdial" and other dial
scripts like ppp-go, pon etc which finally call up pppd,
needs to be run with root privileges. Even kpppd of kde
asks for root password if invoked by an user. pppd is an
industry strength software, and it will *surely* not be
tricked in to doing things, other than what is necessary
by just marking the device "g+w"!
There is no need to change the group for users to just
enable dialing. This is okay for stand alone machines or
small networks, but imagine a big office scenario where
groups could be things like admin, accts, sales etc etc.
Surely, no boss would accept change of group just to
enable user-dial,at the cost of access to group specific
data.
Owner, group and permissions for the modem on my system
is the default installed by debian. Incidentally, debian
developers are very commited and mature and surely would
not goof up on these small aspects.
The default setup is:
crw-r----- 1 root dialout 4, 64 Sep 6 11:20 /dev/ttyS0
This works perfectly fine for me. This has been the set
up for all Linux boxes/ distros that I have used in the
last four years+. No failures.
I enable user-dial through a program called "sudo". Give
it a try. For a stand-alone machine, you could dial with
root privileges easily with "su", and "sudo" may not be
needed at all.
USM Bish
Reply to: