LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-29-2004, 10:26 PM   #1
Hawklad
LQ Newbie
 
Registered: Sep 2003
Location: Broomfield CO
Distribution: Mandrake 9.1/Debian Sid
Posts: 15

Rep: Reputation: 0
Running KPPP as Root = Bad Idea?


...I'm thinking the answer is "Yes."

Problem is, I can't seem to get it to recognize my modem as a regular user.

I just did a Knoppix hard-drive install to get an up-to-date Debian system at home. I configured and loaded the correct modules for my winmodem (HSP Micromodem 56). Now everything works great as long as I login as root and run KPPP from there.

As a regular user, I can't even run KPPP. So, I chmod'ed it to 777 and was able to bring it up. But, it won't recognize the modem ("Unable to locate modem"). Once I switch to root and restart KPPP, its fine again. I don't think connecting to the internet as root is such a good idea though...

I'm thinking there's a simple solution to this. I just don't know what it is, and googling has not helped out yet.

Any advice?
 
Old 02-29-2004, 11:40 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
The problem (I think) is that pppd and maybe other programs used by kppp cannot be run as a normal user (for security reasons).

Try doing
$ su - -c kppp

while you're logged on as a normal user, that loads root's configuration, so that kppp inherits root permission and has /usr/sbin etc. in the PATH.

Dave
 
Old 03-01-2004, 02:16 AM   #3
basix
Member
 
Registered: Dec 2003
Distribution: Red Hat Linux 9, Fedora Core 1, *Fedora Core 2*
Posts: 74

Rep: Reputation: 15
Yes, you cant run KPPP as the normal user. You will have to run it as root =(. But there is a work around it. If you are using KDE then when you try launching KPPP it will say you require root permissions to run this program and ask for the root password. All you need to do is provide it with the root password and it will launch the program and then you will be able to connect to the internet.
 
Old 03-01-2004, 10:47 PM   #4
Hawklad
LQ Newbie
 
Registered: Sep 2003
Location: Broomfield CO
Distribution: Mandrake 9.1/Debian Sid
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for the replies. I tried the su - -c kppp trick, but got "kppp: cannot connect to X server"

Am I missing something? Or, maybe more importantly, do I care? Does dialing out as root expose my machine to swarming hordes of evil internet hackers?
 
Old 03-01-2004, 11:25 PM   #5
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
adduser hawklad -G ppp (or use your distro's 'everything tool to get a user config tool)
 
Old 03-01-2004, 11:58 PM   #6
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
No, dialling out as root isn't a problem (well, not really).

Surfing the web while logged on as root, however is not very clever.

It's strange that you can't do su - -c kppp though.........

Dave
 
Old 03-02-2004, 03:36 PM   #7
TheBman
Member
 
Registered: Nov 2003
Location: Rural Indiana
Distribution: Debian (etch)
Posts: 78

Rep: Reputation: 15
check and ensure that your normal user is a member of "dip" and "dialout" groups. You are obviously using KDE, so open user manager, click on the normal user name, then edit, then groups, and ensure you are a member of both groups. Save the file. then try kppp as normal user.
 
Old 03-02-2004, 04:33 PM   #8
IvanJ
LQ Newbie
 
Registered: Oct 2003
Location: Kraljevo, Serbia
Distribution: Debian
Posts: 27

Rep: Reputation: 15
Or sudo kppp
 
Old 09-23-2004, 06:57 PM   #9
kseskisator
LQ Newbie
 
Registered: Sep 2004
Location: Athens, Greece
Distribution: Debian
Posts: 1

Rep: Reputation: 0
indeed...

...running kppp as root is a bad idea.

The reason why sudo kppp and su - -c kppp don't work on debian, is that for security reasons each user must authenticate him/herself to the Xserver before launching windows on another user's X session. You can do that with the xauth command.

xauth list $DISPLAY as the user with the X session,
xauth add $DISPLAY <auth_cookies> as the other user.

However this is neither elegant nor practical.

Debian users will usually insist that it is far better to avoid kppp and use pppd directly as root (which is not insecure):
su -
pppd call provider

...or to use the pon / poff scripts.

If you do need however to use kppp as a user, you can do the following that worked for me:
- Add your user to the 'dip' group, so that you can use kppp
- Add your user to the 'dialout' group, so that you can access the serial ports
- Edit /etc/ppp/options and put 'privgroup dip' at the end of the file, so that you can use privileged pppd options (like noauth)
- Start kppp, find the pppd options button, and add 'noauth'.

It is not very secure (the group dip can be exploited) but it is far better than running kppp as root. Also, it is logical that Knoppix behaves much like Debian, since it is derived from it.

Good luck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Bad Idea dudeman41465 Linux - Software 1 10-10-2005 02:37 AM
running as root is bad because?... breezewax Linux - Security 4 10-09-2004 05:00 PM
Running KPPP as a user, and not root. RoaCh Of DisCor Linux - Software 5 06-28-2004 05:38 AM
writing a script running firestarter automatically with kppp without root priviliges melquiades Linux - Newbie 3 08-11-2003 06:50 AM
is running root bad??? zetsui Linux - Security 1 06-23-2003 02:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:47 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