LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-17-2003, 10:47 AM   #1
BigBadPenguin
Member
 
Registered: Jun 2003
Location: Warwick (.ac.uk)
Distribution: Arch, Slackware 9.0, (knoppix standing by)
Posts: 256

Rep: Reputation: 30
Broken X - Only works for root


Hello everyone, I've managed to break my X for everyone apart from root, and i'm not entirely sure how. The problem seems to be one of permissions. Running startx as a user gives the error:
Quote:
xf86OpenConsole: Server must be suid root
I can get in through gdm, but then some progs don't work (including xterm and aterm which i NEED).
Looking through ~/.xsession-errors
Quote:
pt_chown: needs to be installed setuid `root'
aterm: can't open slave tty /dev/ttyp1
pt_chown: needs to be installed setuid `root'
xterm: Error 18, errno 13: Permission denied
Reason: spawn: open() failed on ptsname
/var/log/messages: Permission denied
Apart from, obviously, how to fix it, i can't work out at all how i managed to break it. I've just been installing new fonts, so all i've done is changed some fontpaths in XF86Config and run ttmkfdir and mkfontdir, which ran without errors and couldn't really have done anything... it's very strange.
Oh yeah, and there was a previous error with startx from a user, about moving log files. I had to delete them and make /var/log world rwxable. I can't do this with xf86OpenConsole cos it isn't an external prog, and anyway, this seems to be a fundamental problem, which should have a fundamental solution...
Anyway, if you make any sense out of that minddump, and have any ideas I'd be very grateful. I have no idea where to go from here, and running everything as root just scares me.
Cheers!
-BBP
 
Old 07-17-2003, 12:20 PM   #2
teamstatic84
Member
 
Registered: Jul 2003
Posts: 123

Rep: Reputation: 15
I would install Yellow Dog linux if I were you and give up on a good distro like Slackware.
 
Old 07-17-2003, 11:03 PM   #3
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
Is your XFree86 with permission:

-rws--x--x

Run: ls -l /usr/X11/bin/XFree86 to find this out. If not, suggest set the permission correctly for this binary.

Hope this help...
 
Old 07-18-2003, 10:43 AM   #4
BigBadPenguin
Member
 
Registered: Jun 2003
Location: Warwick (.ac.uk)
Distribution: Arch, Slackware 9.0, (knoppix standing by)
Posts: 256

Original Poster
Rep: Reputation: 30
Cheers Ghostdancer, that's actually something i didn't get round to checking. Unfortunately XFree86 already world x-ecutable (i assume you meant -rwx--x--x, right?) as are aterm and xterm. Back to square 1.
But suddenly ptsname and pt_chown in the error message are ringing a bell.. I'm getting a problem with /dev/pts at startup... I'll google it and check it out. But if anyone has any ideas... Thanks anyway ghostdancer.
And teamstatic, why would i want to ditch slackware? It's my fault, not slack's. Slack is the best distro i've used yet.
 
Old 07-18-2003, 12:05 PM   #5
BigBadPenguin
Member
 
Registered: Jun 2003
Location: Warwick (.ac.uk)
Distribution: Arch, Slackware 9.0, (knoppix standing by)
Posts: 256

Original Poster
Rep: Reputation: 30
Talking

well, that worked. Recompiled kernel with pts support on and everything's cool. Guess the fact that it was v. terminals not working should have given me a clue. Weird error msgs tho... anyway, thanks for your help.
 
Old 07-18-2003, 04:45 PM   #6
uxpx
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware
Posts: 4

Rep: Reputation: 0
X is traditionally set-uid root, as ghostdancer pointed out.
(-rws--x--x root ...) When you run a binary as a normal user, it executes as a process with your id, so it can't write to any files that you don't have write access to.
Setting other files to be world-writable is not a good solution to the problem, as other users may be able to exploit the system in various ways.
When X runs set-uid root, it has permission to manipulate various files and devices that unpriviledged users can't (and shouldn't) modify.
 
Old 07-19-2003, 06:32 AM   #7
BigBadPenguin
Member
 
Registered: Jun 2003
Location: Warwick (.ac.uk)
Distribution: Arch, Slackware 9.0, (knoppix standing by)
Posts: 256

Original Poster
Rep: Reputation: 30
Ah, i see... sorry, there's another gap in my knowledge plugged
So it turns out I had two problems, and i only discovered the second when i tried to fix the first. Thanks guys!
By the way, its safe to have full access to /var/log isn't it? Or should i put things back?
 
Old 07-19-2003, 10:27 AM   #8
grym
Member
 
Registered: Jun 2003
Location: Texas
Distribution: Gentoo/Slackware/Debian/Mandrake
Posts: 285

Rep: Reputation: 30
full access to /var/log allows an intruder to change files to hide themselves better.
 
Old 07-20-2003, 02:47 PM   #9
BigBadPenguin
Member
 
Registered: Jun 2003
Location: Warwick (.ac.uk)
Distribution: Arch, Slackware 9.0, (knoppix standing by)
Posts: 256

Original Poster
Rep: Reputation: 30
ha, very good point. Sorry for being such a retard, I'll go fix it.
 
Old 02-21-2008, 02:30 PM   #10
just_Hum
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by BigBadPenguin View Post
Hello everyone, I've managed to break my X for everyone apart from root, and i'm not entirely sure how. The problem seems to be one of permissions. Running startx as a user gives the error:

I can get in through gdm, but then some progs don't work (including xterm and aterm which i NEED).
Looking through ~/.xsession-errors

Apart from, obviously, how to fix it, i can't work out at all how i managed to break it. I've just been installing new fonts, so all i've done is changed some fontpaths in XF86Config and run ttmkfdir and mkfontdir, which ran without errors and couldn't really have done anything... it's very strange.
Oh yeah, and there was a previous error with startx from a user, about moving log files. I had to delete them and make /var/log world rwxable. I can't do this with xf86OpenConsole cos it isn't an external prog, and anyway, this seems to be a fundamental problem, which should have a fundamental solution...
Anyway, if you make any sense out of that minddump, and have any ideas I'd be very grateful. I have no idea where to go from here, and running everything as root just scares me.
Cheers!
-BBP
<<pt_chown: needs to be installed setuid `root'
aterm: can't open slave tty /dev/ttyp1
pt_chown: needs to be installed setuid `root'
xterm: Error 18, errno 13: Permission denied

>>

chmod 4755 /usr/libexec/pt_chown

OR
#chown root xterm
#chmod 4755 xterm
Do the same for aterm

Kool,
just_Hum
 
Old 02-22-2008, 02:23 AM   #11
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Wow... Resurecting a 5 year old post to add another reply. That HAS to be some kind of a record or something...
 
Old 02-25-2008, 08:08 PM   #12
just_Hum
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by jong357 View Post
Wow... Resurecting a 5 year old post to add another reply. That HAS to be some kind of a record or something...
It is not for record , people may get the same error if they are using this particular version .. So I thought this will help them. Also will try to find the posts which are older than this

kool,
just_Hum
 
  


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
CDRom works under /Root, not under non-/root junger Linux - Hardware 6 07-25-2005 07:26 PM
Root Login Broken iraubergeek Ubuntu 2 03-29-2005 08:03 PM
Broken root user Phyrexicaid SUSE / openSUSE 5 02-03-2005 11:54 PM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 04:14 PM
rpm broken for root? ubien Linux - General 1 01-23-2003 01:07 AM

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

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

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