LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-24-2005, 01:11 PM   #1
xbill311x
Member
 
Registered: Mar 2005
Location: Delaware
Distribution: Fedora Core 4
Posts: 93

Rep: Reputation: 15
cannot open kppp or Network after chown and chmod


Someone please help!!! lol...
I have always been able to get system-config-network to open and connect for me, but not kppp. Kppp will open, but would not open modem. Being curious, I looked up this problem online and got this fix:

su (to root)
chown root:root $KDEDIR/bin/kpp
chmod +s $KDEDIR/bin/kppp
exit

So I did this. I know very little about permissions, so I wasn't aware of any repercussions.

Anyway, I can't get KPPP or my Network Device Control to open at all under KDE. When I try to open them, I get an our glass for about 15 seconds, then nothing. When I issue a command in the terminal I get:

for kppp...

[root@localhost bill]# kppp
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

and for network...

[root@localhost bill]# system-config-network
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

ERROR: Unable to initialize graphical environment. Most likely cause of failure is that the tool was not run using a graphical environment. Please either start your graphical user interface or set your DISPLAY variable.

I KNOW it has something to do with the commands I issued to get kppp working. I am still a newbie. Can someone please tell me how to reverse what I've done?

Please

THanks,
Bill
 
Old 11-25-2005, 06:27 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Re: cannot open kppp or Network after chown and chmod

Quote:
Originally posted by xbill311x
Being curious, I looked up this problem online and got this fix:

su (to root)
chown root:root $KDEDIR/bin/kpp
chmod +s $KDEDIR/bin/kppp
exit
Yes, you were right to issue the 2nd command (bit strange it is not done by default) This will allow a normal user to be able to access configuration files of ppp, access the modem, access the Ip<->Name resolution (aka DNS)
But if it is like on my debian, kppp has these rights:
-rwsr-xr-- root dialout kppp
Which means only root and member of group dialout can execute it.
So by isuing chown root:root you have change it to:
-rwsr-xr-- root root kppp
then only root OR MEMBER OF ROOT group can execute it (x), which is too restrictive.
What you should do:
Set back the group of kppp to dialout :
Code:
su
chown root:dialout $KDEDIR/bin/kpp
addgroup <your_user> dialout     (add <your_user> to group dialout)
Then from here, <your user> will be able to execute kppp, and due to the 's' bit, it will appear as root user so he will have access to the resources I've mentionned before.

In case you also want to undo the second command (kppp will no longer work for a normal user):
Code:
chmod -s $KDEDIR/bin/kpp
Quote:

So I did this. I know very little about permissions, so I wasn't aware of any repercussions.


Anyway, I can't get KPPP or my Network Device Control to open at all under KDE. When I try to open them, I get an our glass for about 15 seconds, then nothing. When I issue a command in the terminal I get:

for kppp...

[root@localhost bill]# kppp
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

and for network...

[root@localhost bill]# system-config-network
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

ERROR: Unable to initialize graphical environment. Most likely cause of failure is that the tool was not run using a graphical environment. Please either start your graphical user interface or set your DISPLAY variable.
Here you try to start kppp as root, which is bad! You should always try to use the less privilege user (so that if something goes wrong, the system is secure from break due to permissions)

So, now that user is in group dialout, do it as user:
do not su,

and
$kppp

Quote:

I KNOW it has something to do with the commands I issued to get kppp working. I am still a newbie. Can someone please tell me how to reverse what I've done?

Bill
No its something else, it is the x window security. Root can not directly open window if you logged in as <user>. Only <user> can.
To be able to open window as root:
Code:
man sux
 
Old 11-25-2005, 12:36 PM   #3
xbill311x
Member
 
Registered: Mar 2005
Location: Delaware
Distribution: Fedora Core 4
Posts: 93

Original Poster
Rep: Reputation: 15
hi nx500,

Thanks so much, your response was very descriptive and shed a lot of light on this topic for me. I was able to reverse the chown, and now I can get the Network and kppp open again. I haven't gotten a chance to see if kppp actually lets me dial out yet, but I will check it this evening and, if you don't mind, I will let you know if it worked or not.

Thanks again

Bill
 
  


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
chmod/chown and folders :) chibi Linux - Newbie 2 04-28-2005 05:56 PM
Chown & Chmod swatward Linux - Newbie 2 03-01-2005 01:57 PM
chmod ,chown ,chgrp------------ pal Linux - Newbie 1 02-27-2005 03:49 PM
Log Chmod and Chown FernandoLozano Linux - Security 5 01-10-2005 10:01 AM
Understanding chmod, chown mikemrh9 Linux - Newbie 4 11-19-2004 04:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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