LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-20-2003, 08:10 AM   #1
White R4bbit
Member
 
Registered: Aug 2003
Location: Italy
Distribution: Debian sid 2.6.1
Posts: 54

Rep: Reputation: 15
KPPP can't connect if I'm not root


I've got a strange problem, if I run KPPP by user it seems to connect correctly but I can't do anything cause applications (browsers, xchat, ping..) behave like I'm not connected.
If I run KPPP by root, it connects correctly and I also can use my connection.
This are my kppp/pppd permissions:

Code:
sid:/home/sly# ls -l /usr/bin/kppp && ls -l /usr/sbin/pppd
-rwsrwxrwx    1 root     dip        480728 2003-08-03 03:44 /usr/bin/kppp
-rwsr-xr--    1 root     dip        277624 2003-10-06 20:26 /usr/sbin/pppd
sid:/home/sly#
I also tried to use gkDial but it stops saying "dialing..." both by user and by root, and never really estabilish the connection.

My modem is 56K /dev/ttyS0

Thank you
 
Old 10-20-2003, 09:38 AM   #2
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
This should help.

http://www.linuxquestions.org/questi...404#post545404

RO
 
Old 10-20-2003, 10:47 AM   #3
White R4bbit
Member
 
Registered: Aug 2003
Location: Italy
Distribution: Debian sid 2.6.1
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks, but I don't have any file "/etc/pam.d/kppp"
I just have a /etc/pam.d/ppp:

#%PAM-1.0
# Information for the PPPD process with the 'login' option.
auth required pam_nologin.so
@include common-auth
@include common-account
@include common-session


Maybe it's because I'm running debian, not red hat
 
Old 10-20-2003, 07:07 PM   #4
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
Seems to me that if the regular users can connect, but the connection won't work, maybe it is that they can't write to your /etc/resolv.conf. This is where your DNS servers are stored. If you connect as a regular user, what is in this file? As root? You might try giving rw to the group your user in in for this file.

The old fallback
chmod u+s /usr/sbin/kpppd
should work, but I am always looking for better.

RO
 
Old 10-21-2003, 02:09 PM   #5
White R4bbit
Member
 
Registered: Aug 2003
Location: Italy
Distribution: Debian sid 2.6.1
Posts: 54

Original Poster
Rep: Reputation: 15
SUID bit is already active per kppp and pppd; /etc/resolv.conf is now rw for everyone.
Before this Monday everything worked correctly, I don't know how now things are so bad... btw those are file informations:

sid:~# ls -l /usr/bin/kppp && ls -l /usr/sbin/pppd && ls -l /etc/resolv.conf
-rwsrwxrwx 1 root dip 480728 2003-08-03 03:44 /usr/bin/kppp
-rwsr-xr-- 1 root dip 277624 2003-10-06 20:26 /usr/sbin/pppd
-rw-rw-rw- 1 root sly 84 2003-10-21 19:34 /etc/resolv.conf
 
Old 10-22-2003, 03:28 PM   #6
White R4bbit
Member
 
Registered: Aug 2003
Location: Italy
Distribution: Debian sid 2.6.1
Posts: 54

Original Poster
Rep: Reputation: 15
Uhm /etc/resolv.conf returns to -rw-r--r-- even if I set -rw-rw-rw- ... :O
 
Old 10-22-2003, 05:25 PM   #7
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
What is in the file when you connect as root, then what is in the file when you
connect as a regular user?

RO
 
Old 10-23-2003, 04:03 PM   #8
White R4bbit
Member
 
Registered: Aug 2003
Location: Italy
Distribution: Debian sid 2.6.1
Posts: 54

Original Poster
Rep: Reputation: 15
/etc/resolv.conf is empty when I'm connected as user, and it contains dns when I'm connected as root
 
Old 10-23-2003, 04:39 PM   #9
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
Cool. That explains it.
ls -l pppd
-rwsrwsrwx 1 root root 213202 Jul 22 2002 pppd

I think this is the process that allows the write to /etc/resolve/conf

chmod 774 /usr/sbin/pppd should do it if the user is in root's group, if
not, you will want to chmod 777 /usr/sbin/pppd

See, you assume root when you start kppp, but when root spawns pppd, it
works, but you don't have roots priveledge to change your /etc/resolv.conf

Someone else may know more details, but I think this should work.

RO
 
Old 10-23-2003, 07:33 PM   #10
codec
Member
 
Registered: Sep 2003
Location: mad.es.eu
Distribution: ubuntu 5.04 knoppix Slack91/10 freebsd51 vector4 redhat9
Posts: 304

Rep: Reputation: 30
I use this method:

1. Add a new group - dialout
2. Add users who want to use kppp to the group
3. set the permissions :
chown root.dialout /usr/sbin/kppp
chmod 4750 /usr/sbin/kppp
cd /usr/bin
rm kppp
ln -s /usr/sbin/kppp
4. Create a file /etc/kppp.allow and add users, (who are authorised to do the dialup; user1 in our case) one on each line. There's NO need to add root user here. You can use # for comments. Spaces are also allowed.
5. create a file /etc/ppp/options if not already present
 
Old 10-24-2003, 02:24 PM   #11
White R4bbit
Member
 
Registered: Aug 2003
Location: Italy
Distribution: Debian sid 2.6.1
Posts: 54

Original Poster
Rep: Reputation: 15
I changed permissions of pppd to 777 and now it shows like this:

sid:/home/sly# ls -l /usr/sbin/pppd
-rwsrwxrwx 1 root dip 277624 2003-10-06 20:26 /usr/sbin/pppd

How can I set suid bit for user too? you have -rwsrwsrwx
It still doesn't work for now

@ codec: in file /etc/kppp.allow the user name should be "sly" or user1?

thank you

Last edited by White R4bbit; 10-24-2003 at 02:26 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KPPP sometimes does not connect mike8994 Linux - Networking 1 08-12-2005 11:49 PM
kppp dies after trying to connect. chriskar Linux - Newbie 4 10-05-2004 07:22 PM
Cannot connect kppp in Slackware9.1 krussell Linux - Networking 4 12-13-2003 01:46 AM
KPPP can't connect if I'm not root White R4bbit Linux - Software 0 10-20-2003 08:10 AM
Why does kppp.desktop require root userid for non-root user? rdaves@earthlink.net Linux - Networking 4 08-27-2001 09:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration