# Revisiting "running pppd as a normal user"

## Oyarsa

Ok, I've looked through the archives and discovered a lot of people have the same problem I do: We want to make a modem connection using ppp (through pon/poff scripts) and it works great for root but not for normal users.

Solutions: Here are the common answers I've come across:

1) make sure pppd is setuid root.  (Done.  gentoo took care of it)

2) add normal user to dialout & tty groups.  (Done.)

3) make sure /etc/ppp/peers/provider is world readable or that the group is dialout.  (Done.  Now no more error messages.)

4) make sure the device your modem is on (/dev/tts/0 in my case) has group set to tty and read/write permission is enabled for owner and group.

(Done.  gentoo took care of it)

Result: It still doesn't work!

Questions:

1) Is there an option, like verbose, that will cause pppd to generate a message as to why it's dying instead of just dying quietly?

2) Are there other file permissions I need to worry about?  I would think that with pppd running as root, permissions should not be a problem.  Is that correct?

3) Is there anything else anyone has done to get pppd to work from a normal user account?  Please don't bring up solutions like kppp.  Many of us prefer the simplicity of command line scripts like pon/poff.

----------

## puddleglum

 *Quote:*   

> 3) Is there anything else anyone has done to get pppd to work from a normal user account?

 

This isn't strickly a gentoo problem.  I had the same problem under Mandrake.  I never did fix it

really, but I came up with a work-around.  I was able to set up one user account to dial

out.  This is a home machine, so I made that the internet account.  What I had to do was set

the ownership of /dev/modem to that account.  That's a BIG NO NO!  I know

but it worked and it's the only thing I got to work.  I had to change both the uid and gid to

the internet account to make it work.  The funny thing is minicom always worked fine.   The

problem had something to do with pppd intereaction with the device.

Ok, so I try it with gentoo and guess what it doesn't work here.  Probably something to do

with devfs.  I don't know, but maybe it will give you some idea.  :Rolling Eyes: 

----------

## pjp

'man pppd'  *Quote:*   

> logfile filename
> 
>               Append  log  messages to the file filename (as well
> 
>               as sending the log messages to syslog).   The  file
> ...

 

----------

## pjp

There is alot of stuff in the manpage.  Possibly the longest I've read.  Have you looked for a pppd how-to?

----------

## Oyarsa

It's working!!!

Add a 5th item to the answers above:

5) make sure /etc/chatscripts/provider is world readable or that the group is dialout.I wonder why that didn't generate a permission error message like /etc/ppp/peers/provider did.  logfile filename doesn't have it.  It just saves what is defaulted to stdout.  I did use the dump option to see which files pppd is looking at.  Still, I wouldn't think it would matter with setuid root.

----------

