LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   kppp unable to open modem (https://www.linuxquestions.org/questions/linux-newbie-8/kppp-unable-to-open-modem-441235/)

plantpaul 05-03-2006 08:50 AM

kppp unable to open modem
 
Hello all,
I have recently installed Suse 9.3 on my desktop and have been wading through linux trying to sort out all of the details.

My IP is dialup4less, and so far my modem works using kinternet to dial in. kinternet does not let me use alternate dial in phone numbers without manually selecting and redialing. I would prefer to use just straight kppp, as it has the ability to redial using several numbers.

I Cannot get kppp to work though, I am stuck in the kppp setup. When I try to query the modem, it gives me the prompt "unable to open modem". I have checked the modem device, and have permissions on the modem block device and the symbolic link to it. I know it is not a modem hardware problem, because the modem works using kinternet. I have read something about a modem lock file and have looked in /var/lock but am unable to find anything. Any suggestions where else a lock file might be on my system, or if I have a different problem altogether. Thanks for the help

dracolich 05-03-2006 02:49 PM

Is the pppd daemon running? Some less-featured dialers require it to be not running, but kppp requires that it is.

plantpaul 05-04-2006 08:46 AM

I'm sorry, how do I check if the pppd daemon is running? I tried searching the net for a little bit and am having no luck. And how do I generate a debug file to help me find my problem?

dracolich 05-04-2006 09:57 AM

I don't know about the debug info, but to find out if the daemon is running use this command in a terminal window.

Quote:

ps aux | grep pppd
You should see something like this

Quote:

root 4592 0.0 0.2 2280 1036 ? Ss 10:19 0:00 pppd 115200 -detach crtscts defaultroute usepeerdns
If you need to start it just run the pppd command. Mine is /usr/sbin/pppd. Yours might be different. You may or may not need root priveleges to execute it. If you do just use this

Quote:

su -c "/usr/sbin/pppd"
If yours is not in /usr/sbin then substitute your correct path.

Oh, and if you still wonder about the lock file, I can tell you mine creates a file in /var/lock called LCK..modem. Using kinternet, look for something like that after the modem has made a connection, then again after disconnecting to see if it is being removed properly.


Hope this helps.

sidesec 05-05-2006 08:12 AM

Using the google search phrase "kppp in suse 9.3" brought up a bunch, and the very first link looked promising. Good luck !

plantpaul 05-05-2006 01:04 PM

So... I figured out that kppp will work if run in root. I am still trying to get it to run on my regular user account and have made some progress. After changing permissions to the kppp executable to rwx for user, and SUID for kppp, I get past the "unable to create modem lock file" and "unable to open modem" prompts.

I can query the modem, and when I try to connect, kppp gets stuck on "initializing modem.." and will freeze up kppp. I noticed that when kppp is opened in root, a kbuildsycoca is run in the shell before kppp opens. Is this some kind of configuration that allows root to work with kppp and not my user account?

sidesec 05-06-2006 01:23 PM

You have made progress, and this shows determination and a willingness to learn. However, you never specified your modem hardware, or the driver you are using, or details about the symlink. Many of the otherwise helpful forum folk will not bother asking, and will simply disregard your posts. In order to get help, you must first give help.

Since you cannot initialize the modem as a regular user, this could mean that "users" do not belong to the group being used by kppp, and therefore cannot operate the device. You claimed to have made a symlink but, since you gave no details, we can only assume that the modem driver you are using created a device which you then symlinked to one of the "system" devices specified in your distro (/dev/modem maybe ???) . Open /dev and check the user and group of the system device and the device that your modem driver created. On my system, both show "root" for user and "dialout" for group, and one of them (/dev/modem) shows up as a link since I had previously linked it to the device that my modem driver created. Also, on my system kppp is (-rwsr-x--- root dialout). Kinternet/wvdial may be using the modem device driver which belongs to the "dialout" group which "users" belong to, while the system device link (/dev/modem ???) that kppp is forced to use has "root" as the group. Open /etc/wvdial.conf and near the top of the config you will see the device used by kinternet (Modem = /dev/somedevice). I'm nowhere near being an expert, but this seems reasonable.

Hope this info guides you to a better place. Once again, if you fix it let us know. If not, work on it until you run out of ideas, then re-post in all the suse related forums while giving all the pertinent details.

As a tip--you could use a root konqueror to allow you to examine/change config files and other "root" file access stuff (kdesu konqueror). Be very careful - as root you can seriously hose your system. I also run krusader in user-mode for non-root file access work (/home stuff). Download the latest version for your distro from guru's rpm site. By using two file managers in this way, I feel that there is less chance of me mucking my files/system up. Best of luck !

edited 5-9-06 kppp permissions in my system are (-rwsr-x--- root dialout)

plantpaul 05-07-2006 11:21 AM

Hey, thanks for the help so far. I have been working on this linux transition for a couple of months, and progress is slow. I am learning a lot though, and it is good to know people are out there willing to help.

I took your advice and searched around to find out more information about my modem configuration as well as the rest of my system. I have an Intel Celeron CPU 2.13 Ghz, with a P25G v 1.0A motherboard. OS is SuSe 9.3 kernel version 3.3.5

From this, and looking through my hardware information in YaST controller, I found out I have:

Device: AC'97 Modem Controller
Model: VT82C686/686A/686B Modem Codec (i think this is the model, if not let me know)
Driver: slamr
bus_hwcfg: pci
device name: /dev/ttySL0

I used a good modem id software i found searching that gave me a lot of good general information about my modem drivers and usage. This can be found at:

http://linmodems.technion.ac.il/packages/scanModem.gz

Hmm, what else. My slamr driver sets up the modem device and symlink. After checking permissions for these i find the following:

Quote:

-rwxr-sr-x 1 root dialout /opt/kde3/bin/kppp
-rwxrwxrwx 1 root root /dev/modem -> /dev/ttySL0
-rwxrwxrwx 1 root root /dev/ttySL0 -> /dev/pts/1
-crw-rw--- 1 root uucp /dev/pts/1
When i tried to chgrp of the modem or ttySL0 devices, it gives me the prompt "group of /dev/ttySL0 retained as dialout". Why does it tell me this when it shows ownership of ttySL0 as root root? :confused:

I have made sure that my user account is in the dialout and uucp groups, but am still getting stuck with ¨iniatilizing modem.." I don't think it is a problem with my permissions as I am able to open modem and create lock file, but get stuck initializing. I will follow your suggestion and start a post on a suse forum and try and get more help, but if you have any ideas, it would be greatly appreciated.:)

mlangdn 05-07-2006 08:37 PM

Try this link - it solved my problem:

http://developer.kde.org/~kppp/faq.html

sidesec 05-07-2006 10:58 PM

Good job - you are on your way. It's frustrating, but trying to fix the kppp regular user problem is a good learning tool.

a.) AFAIK, kppp's permissions should be (-rwsr-x--- root dialout). If you changed them, return them to their original state in order to get to a solid starting point again. First run it as root to make sure it works, do a modem query for the heck of it, then run kppp as a regular user by hitting the "Connect" button only, and note any error messages or weird behavior. Then do the "Query Modem" test again and note what happens. Now you can begin to troubleshoot. I know that you have been down this road a zillion times, and are questioning your own sanity, but it doesn't work the way it is supposed to anyway, so you might as well start fresh. Just keep thinking about how good you will feel once you find the answer.

b.) The kppp notices "unable to open modem" and "initializing modem" can lead to different conclusions. The former can make you think that kppp cannot find the device (possible permissions problem, which could include the owner or group, some very weird mis-config that works one way but not another, or some internal problem with kppp itself when running as a regular user). The latter could mean that kppp found the device, but that something is wrong with "Initialization string 1" or "Initialization string 2" in the "Modem Commands" section of the "Modem" tab in the kppp "Configure" option. My "Init 1" is "ATZ" and my "Init 2" was copied directly from my not-missed windoze install. Your "Init 2" is likely to be different than mine anyway, but check it for errors if you entered it manually into kppp. If I remember correctly (never a sure thing), kppp just pulled that info from the modem config that I did in YaST. If so, and since user-wvdial and root-kppp have no problem with the strings, then that would be a dead end.

c.) Doing a (ls -l) of /dev/modem you will get (lrwxrwxrwx 1 root root 11 2004-12-02 12:12 /dev/modem -> /dev/somedevice), which is incorrect. Use (ls -Ll) to see the real deal on a symlink, or open /dev and check for yourself. If you want to change the permissions, right click on the file, select properties, make the changes, then verify (the change should show immediately, but may not). The file manager, or the terminal box at the bottom of the file manager will probably need root status to make the change. Get out of root status after the change, then test it.

d.) In 9.1 I had to do two things to enable user-kppp that may, or may not, apply to 9.3 and your setup.

1.) Kppp was looking for a file in /etc/ppp/peers named "kppp". I copied the wvdial file shown in that directory, renamed it to "kppp" (no quotes) and changed the line beginning with "name" to reference "kppp" instead of "wvdial" (once again do not use the quotes). Copied it back to /etc/ppp/peers, and verified the original permissions. My understanding is that the file has something to do with the authentication process with your ISP. Anyway, my kppp wanted and liked it.

2.) I had to copy /etc/ppp/resolv.conf to /etc. Evidently, that's where kppp expected to find it. If you try this, it can be an empty file, but make sure the permissions remain the same as the original. For reasons I don't understand, if I happen to enter YaST to learn something about how other network settings are made, /etc/resolv.conf gets deleted and I have to replace the file in order for user-kppp to work. My system exhibits no other unusual behavior. Weird huh !!!!


Well, that pretty much empties me out on this issue. If I run across anything, I'll post here - you do the same. Get back to your initial conditions, run tests, keep good notes, google your butt off, and post in other forums. If you also find a way to auto-redial different numbers in kinternet/wvdial tell us about it. Good luck !


(edited 5-9-06 kppp permissions in my system are (-rwsr-x--- root dialout)

plantpaul 05-08-2006 04:42 PM

Thanks for all the good info. I am actually leaving on a trip till Thursday, and won't be posting for a while, but that does not mean I am giving up. I will keep you posted on my progress...

sidesec 05-09-2006 03:56 PM

You are welcome -

From what I can find out, and most of what I read seems dated or thin - as a regular user you can "start" kppp because the SUID bit allows a regular user to execute (start) a program with the same permissions as the owner (root) as long as the user is a member of the same group that the program is (dialout). Once it's "started" kppp, according to docs at the kde site, runs two separate processes internally, which makes your internet connection more secure. I know that connecting to the net as root is never a good idea. Let's go thru this one step at time.

1.) Reset any permissions that you may have modified. Double check kppp to be (-rwsr-x--- root dialout) and not (-rwxr-sr-x root dialout) as you showed. I rechecked mine (/opt/kde/bin/kppp) and "yikes" realized that I had mis-typed mine in my last two posts. lol - It's difficult to help people when you can't help yourself. I already edited those posts, and I hope that I didn't confuse too many folks. Unless kppp/suse made some changes since 9.1, which is possible, yours may still be incorrect. Please verify the original permissions of kppp before continuing.

2.) We know that you have to belong to the dialout and uucp (/pts/1) groups because kinternet works. If you want to see which groups you belong to, just enter the term "groups" (no quotes) in a console as a regular user.

3.) Now, according to the suse 9.1 manual /etc/resolv.conf is created when you do your network setup, which I skipped during install because I didn't think that I needed it for dialup, and apparently I didn't since I was able to get kinternet working without adding /etc/resolv.conf. It is exclusively controlled by a network script in /sbin, which could explain the odd behavior I get when I muck around in the network config of YaST. Maybe smppd separates the standard ppp from pppoe (ethernet) and you end up with two different resolv.conf files after a network config ???? It looks like kppp needs /etc/resolv.conf on my system, but kinternet does not. Since you don't get error messages looking for it, then you must have it on your system. Do you ? And do you also have /etc/ppp/resolv.conf ?

4.) If you already have /etc/resolv.conf and you made sure that your permissions were ok, then test kppp again as I described in my previous post. Does it work ? If not, what error messages or behavior did you get from the "connect" and from the "query" ? Post the result of (ls -l /opt/kde3/bin/kppp), and post the (ls Ll) of /dev/modem, /dev/ttySL0 and /dev/pts/1.

plantpaul 05-14-2006 11:46 PM

Yesss, it finally works without opening kppp in the user shell. So, it came down to a few simple mistakes that I should have seen a while ago. Sorry about the delay, I was out of town longer than I thought I would be. First I'll answer some of your questions

After changing my permissions of /opt/kde3/bin/kppp back to what they should be (-rwsr-x--- root dialout), and doing a ls -Ll command on /dev/modem and /dev/ttySL0 (thanks for pointing that out!) I get (-crw-rw---- root uucp) for both. I hope this all looks correct, I have been messing with permissions to try and get this to work, and I hope I have not messed anything up.

There is a file named ppp in /etc/ppp/peers that is almost the same as wvdial in that folder. The only difference is a line at the end that says "name wv dial". What you say sounds right to me as part of the authentication process. There is a comment in the file saying something about piping a password to pppd. So, no issues there for me.

There is also a file named resolv.conf in /etc and /etc/ppp on my system. So, again, I am doing OK there.

After entering groups in the command line, I see that my user account is in both the uucp and dialout groups. So, everything OK there too.

But when I checked to see the list of modem commands in the configuration of kppp, I see a bunch of blanks. :( Easy problem to fix though, as the commands are in my root kppp from when I set up my modem with Yast controller. I simply copied them over manually. And, I get past the "initializing modem.." freezing up problem. Problem solved. :D

So after all the hair pulling and frustration, I narrowed down my list of problems to this.

1. I did not have the right permissions on /opt/kde3/bin/kppp and have thus changed to -rwsr-x---

2. I was missing my modem commands in my user kppp configuration, and fixed by mannually entering.

3. Something I figured out on my own, is that pppd kept timing out while trying to authenticate, so i just bumped the timeout config from 30 seconds to 60 seconds.

Again, thanks for the help. It all seems so simple now that I have fixed it, it is just hard troubleshooting from scratch. I am on my way to a safer internet..

sidesec 05-15-2006 12:57 AM

Congratulations! You also helped me understand more about my own system configuration. Enjoy Linux!


All times are GMT -5. The time now is 01:25 AM.