Networking Forums

Networking Forums > Computer Networking > Linux Networking > dialup as a normal user

Reply
Thread Tools Display Modes

dialup as a normal user

 
 
* Tong *
Guest
Posts: n/a

 
      10-15-2003, 04:05 PM
Hi,

I've been googling around for how to dial up Internet as a normal user. Read
on if you are interested in my brief memo. I also have a question at the end
of the message.

Use wvdial instead of chat, kppp, etc. to do it. Google back for chat, kppp,
wvdial and wvdialconf if you don't know why/how.

Here are all the steps required for a normal user to dial up the Internet:

chown root.uucp /usr/sbin/pppd /usr/bin/wvdial
chmod 4550 /usr/sbin/pppd /usr/bin/wvdial

add users who can dial to group uucp.

NB,

- If only change pppd, or no +s for wvdial, you'll get:

$ wvdial
--> WvDial: Internet dialer version 1.53
--> Cannot open /dev/ttyS0: Device or resource busy

changing ownership of /dev/ttyS0 (from crw-r----- to crw-rw----) won't
work. It will be changed back when you reboot.


Now here is my problem. With the setting above, I still cannot connect
through. ppp daemon died with exit code 2, which means "An error was
detected in processing the options given, such as two mutually exclusive
options being used."

--> Looks like a password prompt.
--> Sending: (password)
PPP session from (64.7.158.15) to 64.7.158.149 beginning....~[7f]}#@!}!}!} }4}"}&} } } } }%}&o}8GD}'}"}(}"[0b]j~
--> PPP negotiation detected.
--> Starting pppd at Sun Oct 5 15:27:18 2003
--> pid of pppd: 3394
--> Disconnecting at Sun Oct 5 15:27:18 2003
--> The PPP daemon has died: pppd options error (exit code = 2)
--> man pppd explains pppd error codes in more detail.
--> I guess that's it for now, exiting
--> The PPP daemon has died. (exit code = 2)

But strange enough, with the same setting, I have no problem connect as
root. I'm using RH8. What the problem could be? Thanks

Tong

FYI, here is my /etc/ppp/options, if it might helps.

lock
defaultroute usepeerdns



--
Tong (remove underscore(s) to reply)
*niX Power Tools Project: http://xpt.sourceforge.net/
- All free contribution & collection
 
Reply With Quote
 
 
 
 
Peter T. Breuer
Guest
Posts: n/a

 
      10-15-2003, 05:02 PM
* Tong * <(E-Mail Removed)> wrote:
> Now here is my problem. With the setting above, I still cannot connect
> through. ppp daemon died with exit code 2, which means "An error was
> detected in processing the options given, such as two mutually exclusive
> options being used."


Turn on more logging. Use "debug" as a ppp option. Etc.

> PPP session from (64.7.158.15) to 64.7.158.149 beginning....~[7f]}#@!}!}!} }4}"}&} } } } }%}&o}8GD}'}"}(}"[0b]j~
> --> PPP negotiation detected.
> --> Starting pppd at Sun Oct 5 15:27:18 2003
> --> pid of pppd: 3394
> --> Disconnecting at Sun Oct 5 15:27:18 2003
> --> The PPP daemon has died: pppd options error (exit code = 2)
> --> man pppd explains pppd error codes in more detail.
> --> I guess that's it for now, exiting
> --> The PPP daemon has died. (exit code = 2)
>
> But strange enough, with the same setting, I have no problem connect as
> root. I'm using RH8. What the problem could be? Thanks


An option that only root can use.

> FYI, here is my /etc/ppp/options, if it might helps.


Not enough. Also need the ISP specific stuff. But turn on more
debbugging and logging and we will see.

> lock
> defaultroute usepeerdns


Peter
 
Reply With Quote
 
Peter T. Breuer
Guest
Posts: n/a

 
      10-15-2003, 05:04 PM
* Tong * <(E-Mail Removed)> wrote:
> FYI, here is my /etc/ppp/options, if it might helps.


OPTIONS FILES
Options can be taken from files as well as the command
line. Pppd reads options from the files /etc/ppp/options,
~/.ppprc and /etc/ppp/options.ttyname (in that order)
before processing the options on the command line. (In
fact, the command-line options are scanned to find the
terminal name before the options.ttyname file is read.)
In forming the name of the options.ttyname file, the ini
tial /dev/ is removed from the terminal name, and any
remaining / characters are replaced with dots.

>
> lock
> defaultroute usepeerdns


Look further. You need more debugging turned on.


Peter
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      10-15-2003, 07:10 PM
Peter T. Breuer <(E-Mail Removed)> wrote:
> * Tong * <(E-Mail Removed)> wrote:
>> FYI, here is my /etc/ppp/options, if it might helps.


> OPTIONS FILES
> Options can be taken from files as well as the command
> line. Pppd reads options from the files /etc/ppp/options,
> ~/.ppprc and /etc/ppp/options.ttyname (in that order)
> before processing the options on the command line. (In
> fact, the command-line options are scanned to find the
> terminal name before the options.ttyname file is read.)
> In forming the name of the options.ttyname file, the ini
> tial /dev/ is removed from the terminal name, and any
> remaining / characters are replaced with dots.


Also, here are excerpts from the man page descriptions of the call and
file options:

call name
Read options from the file /etc/ppp/peers/name.
This file may contain privileged options, such as
noauth, even if pppd is not being run by root.

file name
Read options from file name (the format is
described below). The file must be readable by the
user who has invoked pppd.

Moreover, wvdial may invoke pppd with these or other options wired into
the command line. When a frontend to pppd with a chat replacement works
then it's fine, but when it doesn't - Good Luck!

>>
>> lock
>> defaultroute usepeerdns


> Look further. You need more debugging turned on.


Also, adding the pppd option dryrun (man pppd) to the options file should
show all the options that are being used.

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
 
Reply With Quote
 
* Tong *
Guest
Posts: n/a

 
      10-16-2003, 07:03 PM
On Wed, 15 Oct 2003 14:10:13 -0500, Clifford Kite wrote:

> Also, adding the pppd option dryrun (man pppd) to the options file should
> show all the options that are being used.


Thanks everyone for your help, especially Clifford, his suggestion directs
my straight to solving the problem. On adding the following line to my
/etc/ppp/options,

debug dryrun

I can see an error entry in my system log file (/var/log/messages):

Can't open options file /etc/ppp/peers/wvdial: Permission denied

Using the command

chmod 644 /etc/ppp/peers/wvdial

Solves the problem, but I'm wondering if it is the right way...

I dig deeper into it, and found that /etc/ppp/peers/wvdial comes with wvdial
package. On checking the package status (rpm -V -p wvdial-1.53-7.i386.rpm),
rpm reports a mode change for /etc/ppp/peers/wvdial:

.M...... c /etc/ppp/peers/wvdial

So I guess my RH8 comes that way. I might not need to redo the
changing again and again... Don't know yet. Please comment.

Thanks


--
Tong (remove underscore(s) to reply)
*niX Power Tools Project: http://xpt.sourceforge.net/
- All free contribution & collection
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      10-17-2003, 12:58 AM
* Tong * <(E-Mail Removed)> wrote:
> I can see an error entry in my system log file (/var/log/messages):


> Can't open options file /etc/ppp/peers/wvdial: Permission denied


> Using the command


> chmod 644 /etc/ppp/peers/wvdial


> Solves the problem, but I'm wondering if it is the right way...


I don't think there's a thing wrong with changing permissions to get
pppd to work.

> I dig deeper into it, and found that /etc/ppp/peers/wvdial comes with wvdial
> package. On checking the package status (rpm -V -p wvdial-1.53-7.i386.rpm),
> rpm reports a mode change for /etc/ppp/peers/wvdial:


> .M...... c /etc/ppp/peers/wvdial


I don't do rpm's, and perhaps that's the reason I can't parse this.

> So I guess my RH8 comes that way. I might not need to redo the
> changing again and again... Don't know yet. Please comment.


Earlier you said that the permissions of the device file /dev/ttyS0
changed on reboot. I think that would only happen if a boot-up script
was configured to change them.

It doesn't happen here, but there are some programs that won't
restore the device file to the state it was in before they used it.
Pppd does change the permissions to crw-r--r-- but (mostly) they go
back to crw-rw-r-- when it terminates cleanly.

If pppd is not terminated cleanly, e.g. when the peer abruptly hangs up
(I think that's a good example, it's been awhile since I looked into it),
then the permissions don't change back. There have been other instances
that it didn't change them back and I never was able to determine why.

If you are interested, you can find a simple patch for pppd 2.4.1 at the
web site in my signature which appears to fix that problem. At least it
works a treat for me.

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
 
Reply With Quote
 
Bill Davidsen
Guest
Posts: n/a

 
      11-02-2003, 04:19 AM
* Tong * wrote:
> Hi,
>
> I've been googling around for how to dial up Internet as a normal user. Read
> on if you are interested in my brief memo. I also have a question at the end
> of the message.
>
> Use wvdial instead of chat, kppp, etc. to do it. Google back for chat, kppp,
> wvdial and wvdialconf if you don't know why/how.
>
> Here are all the steps required for a normal user to dial up the Internet:



1 - define a connection in /etc/ppp/peers to do the connect. Include
"demand" in the def.

2 - start it from rc.local, "pppd call myisp"

3 - it will call when you use IP

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
when a user opens word, a homemade file is loaded and not normal.d matthijs Windows Networking 1 06-05-2008 08:37 AM
Enable RAW socket for normal user Uwe Klatt Windows Networking 1 07-11-2007 02:57 PM
xisp user dialup. Otako Linux Networking 3 06-04-2004 09:29 PM
traceroute doesn't work as a normal user Tetsuji Rai Linux Networking 2 05-09-2004 02:55 AM
can't connect via ssh as a normal user nicolas Linux Networking 1 11-01-2003 11:20 PM



1 2 3 4 5 6 7 8 9 10 11