Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Users not in root group can't open terminals
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
TiCpu
n00b
n00b


Joined: 23 Mar 2004
Posts: 29
Location: Québec in Canada

PostPosted: Sat Jun 12, 2004 12:32 am    Post subject: Users not in root group can't open terminals Reply with quote

Any user which aren't in the "root" groups can not open any konsole, xterm or any kind of terminals, even when adding them in tty groups it doesn't change anything. My kernel is compiled with all the necessary options as I checked in many threads of users having this problem.
with gentoo-dev-sources-2.6.5-r1
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
and also devfs and automaticaly mount /dev (I tried without too)
it started to happen when I copied my installation from one HD to my DVD-RAM using cp -ax /mnt/hda6/* /mnt/cdrom and copied it back to a new HD. Everything else is still working but that so it could have started before and I didn't notice it.

Anyone have an idea or need more infos?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20629

PostPosted: Sat Jun 12, 2004 12:42 am    Post subject: Reply with quote

Sounds like a file/dir permissions problem. Are your permissions on /tmp drwxrwxrwt ? (ls -ld /tmp)
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
TiCpu
n00b
n00b


Joined: 23 Mar 2004
Posts: 29
Location: Québec in Canada

PostPosted: Sat Jun 12, 2004 12:54 am    Post subject: Reply with quote

yup, and /var/tmp too is drwxrwxrwt (1777), using -a should normaly keep those, I realy don't know what I can do, I recompiled kernel many times with different options and tryed everything to make it work, the only possible way I found is to chmod 777 /dev/pty/* but then everyone can write to anybody's terminal, and that isn't realy secure.
Back to top
View user's profile Send private message
snekiepete
Guru
Guru


Joined: 07 May 2003
Posts: 306
Location: WISCONSIN

PostPosted: Sat Jun 12, 2004 1:02 am    Post subject: Reply with quote

you could add the users to the tty group
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20629

PostPosted: Sat Jun 12, 2004 1:04 am    Post subject: Reply with quote

snekiepete wrote:
you could add the users to the tty group
Did you even read the post?

TiCpu wrote:
Any user which aren't in the "root" groups can not open any konsole, xterm or any kind of terminals, even when adding them in tty groups it doesn't change anything.

_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sat Jun 12, 2004 1:25 am    Post subject: Reply with quote

I had exactly the same problem under FreeBSD when I copied my partitions to a new HD. Besides the /dev/pty/* permissions (which you've checked) and the permissions on /tmp (which you've also checked), I had to remove all the files and subdirectories in /tmp. There's a lot of X and window manger related files in there. Once I did that, everything worked. YMMV but HTH :D
Back to top
View user's profile Send private message
TiCpu
n00b
n00b


Joined: 23 Mar 2004
Posts: 29
Location: Québec in Canada

PostPosted: Sat Jun 12, 2004 1:47 am    Post subject: Reply with quote

Looks bad for me, I do it often, and for /dev/pty permissions, what are yours, it could be that.

Code:
/dev/pty            drwxr-xr-x root:root
/dev/pts            drwxr-xr-x root:root
/dev/pty/m*         crw------- root:root
/dev/pty/s*         crw------- root:tty

and symlinks in /dev of ttys and ptys are all
lr-xr-xr-x root:root


Could it be those?
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sat Jun 12, 2004 1:56 am    Post subject: Reply with quote

The /dev/pty/* should at least be 0660 (crw-rw----) or 0666 (crw-rw-rw-) if you're not too worried about pty security. The owner is root and the group is tty. At least that explains why being in the tty group didn't help as only root could read and write to the pty!

Edit: corrected permissions


Last edited by papal_authority on Sat Jun 12, 2004 2:08 am; edited 1 time in total
Back to top
View user's profile Send private message
TiCpu
n00b
n00b


Joined: 23 Mar 2004
Posts: 29
Location: Québec in Canada

PostPosted: Sat Jun 12, 2004 2:06 am    Post subject: Reply with quote

ok because each reboot it reset to crw-------, could it be a problem in a configuration file? like I always get back all devices I delete in /dev (for exemple I delete md10-md255 and they come back after a reboot)

Last edited by TiCpu on Sat Jun 12, 2004 2:25 am; edited 2 times in total
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sat Jun 12, 2004 2:17 am    Post subject: Reply with quote

I'm no expert on devfs (in fact I hate it) but you should just be able to do this as root:
Code:

cd /dev/pty
chmod 666 *
chown root:tty *

There is probably some way of signalling devfsd to rebuild /dev but I've never looked into it. That should get your system fixed though :D
Back to top
View user's profile Send private message
TiCpu
n00b
n00b


Joined: 23 Mar 2004
Posts: 29
Location: Québec in Canada

PostPosted: Sat Jun 12, 2004 2:26 am    Post subject: Reply with quote

and I get that error with 0666 when opening a konsole as a user:
Code:
 /dev/ttyp0 is not slave for the master pty on fd 3

that is an error I don't understand :? but I can type in it.
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sat Jun 12, 2004 2:35 am    Post subject: Reply with quote

Oh boy you're running KDE as well? Did you exit out to the command line delete all the sub-directories and files in /tmp including the hidden .dotfiles?

Last edited by papal_authority on Sat Jun 12, 2004 2:36 am; edited 1 time in total
Back to top
View user's profile Send private message
TiCpu
n00b
n00b


Joined: 23 Mar 2004
Posts: 29
Location: Québec in Canada

PostPosted: Sat Jun 12, 2004 2:36 am    Post subject: Reply with quote

yeah yeah I do it often, same for /var/tmp
[edit] konsole works with an error but xterm doesn't open at all [/edit]
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sat Jun 12, 2004 2:40 am    Post subject: Reply with quote

Does KDE start yet for a normal user? Maybe it's a KDE issue. Have you tried rebooting? I'm not trying to give you a Windows solution, I'm just trying to keep it simple :D
Back to top
View user's profile Send private message
TiCpu
n00b
n00b


Joined: 23 Mar 2004
Posts: 29
Location: Québec in Canada

PostPosted: Sat Jun 12, 2004 2:45 am    Post subject: Reply with quote

lol, yeah, KDE starts for everyone and for rebooting, mmmm... when I was trying kernels it didn't help and permissions always reset to crw------- too, looks like ANother unsolvable problem, will I need another windows-like solution : reinstalling 8O ?!
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Sat Jun 12, 2004 3:00 am    Post subject: Reply with quote

You need a line like this in your /etc/devfsd.conf:
Code:

REGISTER        ^pty/m.*     PERMISSIONS -1.tty  0660

Then reboot. I trashed my 37 day uptime to test this :D
Back to top
View user's profile Send private message
TiCpu
n00b
n00b


Joined: 23 Mar 2004
Posts: 29
Location: Québec in Canada

PostPosted: Sat Jun 12, 2004 3:04 am    Post subject: Reply with quote

oh :-/ that is if I want it to be 0660 because even 0660, konsole works but there is a warning and everyone can write to anybody's terminal, and worst of all xterm doesn't work !! thats why I said it looks like an unsolvable problem
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20629

PostPosted: Sun Jun 13, 2004 6:16 am    Post subject: Reply with quote

Have you checked the permissions on xterm? "-rwxr-sr-x"
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum