TuxPPC
TuxPPC
home   |   submit: news, guide,   |   volunteer   |     |  


Sponsored by
Sponsored by PowerMax.com

Buy iMac


News Editions

About iMac

About Linux

Getting Started

Getting Help

User Resources

Advertisement

Distributions

Software Picks






Search

 

Links
  iMacLinux Edition Thursday, 03 July 2003  



Posted by on Friday August 18th, 2000 10:07:34 PM
If you are a KDE user, and have a dialup connection, you should consider using KPPP as an Internet dialer. It offers many features like a nice dock applet, the KDE look and feel and scriptablity. Most importantly, it's very easy to use.


KPPP Versions

KPPP with 1.1.1 or earlier (shipped before Sept. 99) are incompatible with Kernel 2.2.12 or later. Either downgrade your kernel, or upgrade to the latest version of KDE.

If you are using KPPP with KDE 1.1.2 (looks Windows like, in distros post-Sept. 99), then you will get an error about the Kernel not having PPP support, if you are using a recent kernel (post 2.2.12). This is due to a minor bug in KPPP (it tested the kernel for PPP support in a way that was removed for security reasons), it is completely safe to ignore.

KDE 2.0 (shipped Sept. 2000) doesn't have this bug.

Make KPPP Suid root

Before you use KPPP, you should make it suid root (set the program to run as root), so that users can dial out using it. root is required for some of the configuration abilities of KPPP.

You can do this by typing in a xterm: chmod +s /usr/bin/kppp.

Note: You should be extermely careful with using suid, as it can present a serious security risk. You should avoid this when possible. Sudo provides an alternative to suid, you should investigate this program further if you are tempted to use suid to be able to run a program as root without being root.

Why is this safe to do with KPPP? See this page for the offical explanation.

Setting Users Who Can Use KPPP

Next you need to setup who can use KPPP. Using you favorite text editor, edit or create /etc/kppp.allow. Add the names of users you want to allow to use KPPP. An example file:

 

# /etc/kppp.allow
# This file tells who can use KPPP on your system. Obviously, you 
# probably don't want to allow user imaclinuxtest to use KPPP on your system :)
imaclinuxtest
joshua
mike
fred
root

You don't want anybody but root to be able edit this file, use this command: chown root /etc/kppp.allow;chmod ag-w /etc/kppp.allow. This changes the ownership of the file to root, and removes write privledges of everybody from it.

Starting Up KPPP

KPPP is now configured to run as any user you want. Start it up.

Don't worry about the error message in KPPP claiming the kernel doesn't support ppp, it is safe to ignore (see above). The only way to avoid this error is to install KDE 2.0.

Creating a New Account

An account is a set of settings that allow you to connect to a certian ISP. You can have multiple accounts, if you have multiple ISPs, or have different preferences.

Click New to Add a New Account. A new window will popup.

Dialup Tab

Enter in the connection name. The connection name can be something that reminds you of who you are connecting to, no spaces and lowercase is preferred, but not required.

Enter the Phone Number. You can add a slash if you choose, it's not required. This can be gotten from Mac OS's PPP Control Panel.

Authentication. Most likely PAP (Peer to Peer Authenication) as this is the default in Mac OS. Terminal and script based authentication is avalible if you want them (and know how to use them).

Store password checkbox. Most likely you will want this, it is more secure however not to check this (as the password is stored in plain text in the kppp config file).

Excute program on connect or disconnect. Add any programs you want started pre-connection or post-connection. I use this for starting and stopping kitclient (an AOL instant messenger client).

If you can't dialup the number, check to make sure you haven't made mistakes to the phone number. If authenication fails consistantly, try changing PAP to CHAP, then CHAP to Terminal. Most commonly authenication fails errors are caused by invalid name or password. Often KPPP reports authenication fails as pppd unexpectly died!

IP Tab

Everything here should be left alone except if you have a static IP address (very unlikely, you will know if you have this). Then you can click static IP address, and enter it in.

Make sure the Auto-configure hostname from this IP option is disabled! Bad things will happen if it is enabled, such as you won't be able to open any more windows on X without restarting it (as it changes the hostname of the local system to match the Internet, therefore confusing X on who to allow to use the X).

DNS Tab

This section contains many important settings required for a good network connection. You should get this info from the TCP/IP panel in Mac OS.

The first is the domain name, or the search domain. Many large ISPs require this (especially running on Windows NT), smaller ones do not. You can check if you need this from the Mac OS's TCP/IP panel. If you don't, just leave it blank.

Next, you need to enter in the DNS IP Address. These are the found in the Mac OS TCP/IP panel also. Enter one line in at a time, and click add to add to KPPP.

If either one of these has a mistake, you will be able to connect to the internet, however domain names won't work (however numeric addresses will). For example, you will be able to visit iMacLinux.net via. 216.23.22.254 but not imaclinux.net.

In most cases Disable existing DNS Servers during connection should be unchecked. This option allows existing servers listed in /etc/resolv.conf to be used when using KPPP.

The Rest of the Tabs

You shouldn't need to look at these, unless you want to. The accounting tab is useful if you pay by the minute on phone calls.

Click OK.

Setting up the Modem

This section sets up the physical modem. It assumes you are using an external modem on an oldworld Mac or an internal modem on a newworld Mac. USB modem info to be added in the near future.

Click the Device tab. Using the pulldown menu, choose /dev/ttyS0 as the modem device. On most machines, this is the internal modem or the modem port. You can leave the rest of the settings alone.

Click the Modem tab. Press the Query Modem button. This will run several modem querys on the modem. You should see some info on your modem, it's not important, as long as it appears. If it doesn't, try another serial port (see previous step). Close this window out. This tab can also change the busy wait, and the modem volume.

On some modems (mainly slower ones), you may have to click Modem Commands, and increase the Pre-Init delay, Post-Init delay and the Guard Time.

Click OK. You can leave config now.

Connecting

Enter your login ID for your ISP and your password. Make sure that the right account is showing in the Connect to: drop down menu.

Now you are ready to connect, click connect.

If all went well, it should connect, log you on, then KPPP should disappear, and have a set of green flashing lights replacing it in the KDE applet dock.

Now test your network connectivity. Try opening netscape, and going to imaclinux.net. If this fails, try going to: . If the second works, check the settings in the DNS tab of KPPP.

Disconnecting

Right Click on the dock applet with the flash lights on it. Click disconnect. This will disconnect you.

Starting and Shutting off KPPP from a Script or an xterm

  • KPPP can be started by: kppp -c accountname
  • KPPP can be terminated by: kppp -k

    These commands run KPPP, minus the annonying dialogs. They therefore, must be run while X is running, from inside of X.

    Troubleshooting

    Modem Doesn't Initalize: Are you using the right port? If USB, do you have the proper USB support compiled in? Try increasing the post- and pre- init time (see above).

    Modem Is Hard to get to or slow to Hang Up: Go to Setup > Modem > Terminal. Type in:

    ATZ 
    AT&D2
    AT&W
    

    This enables DTR drop, it is much faster and reliable then the default method (but less flexable).

    pppd unexpectly quit!: This error is almost always caused by an authenication problem. Check your password and username, and possibly try another authenication method. Also check to see if KPPP is suid.

    Can't access serial port in KPPP, except as root: Check to see if KPPP is suid.

Search for imaclinux

The Fine Print: The following comments are owned by whoever posted them.
(Reply)

itm
by Ms on Monday March 24th, 2003 05:22:15 AM
Ok

  Legal and Privacy Notices Copyright © 2001