From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 77593138CBF for ; Tue, 17 Mar 2015 20:31:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 92A38E0A6D; Tue, 17 Mar 2015 20:31:07 +0000 (UTC) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 51F3CE09CF for ; Tue, 17 Mar 2015 20:31:06 +0000 (UTC) Received: by lbcds1 with SMTP id ds1so15797001lbc.3 for ; Tue, 17 Mar 2015 13:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=5fJQzoj0+r2lwpdG6TfGFXuGlLLMm8ZZvGsGdcMLUKA=; b=V559cYoqbVhuVfx27nyPDpNwMT4AlNOYI3fWrHa4Yi2iJY1EFj0AwstxM9D8qm7yDc +XSRef5K/ys/5qgJFXEl7FZSIrw3U472l2oEmI3AXgX5nTRPdVrdECStM3PxQJc1hwaF aYYIWkBcyAtO3bXkXK0f+Rwm3qPCmrhptpKP2CxdfRL+NXVIyKikE8QV1VFw6M6PXEVc hK+o8wOOGBOwe/WtbpeZjfGR4aB68RJjZN+r8PkxCL2LKGPEfXuTBxRjzM77FqpMqS4c zcNef4QYv4WyNVdZT8GyGAZcgDFC0uRsjnWbgDG3LoNxlB0QXbaKGxG4049B+pziuNSQ 9xhg== X-Received: by 10.152.10.98 with SMTP id h2mr60964653lab.18.1426624264966; Tue, 17 Mar 2015 13:31:04 -0700 (PDT) Received: from digger ([178.70.107.251]) by mx.google.com with ESMTPSA id x9sm2985251lax.20.2015.03.17.13.31.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2015 13:31:04 -0700 (PDT) Date: Tue, 17 Mar 2015 16:31:01 -0400 From: German To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update] Message-Id: <20150317163101.9a6486c88007f5d44f6993ba@gmail.com> In-Reply-To: <462A6275-708E-4A79-B148-01A257B9F476@iki.fi> References: <20150313115241.60fee51b1e2d361dcdd99f7c@gmail.com> <125a8276-2199-4dae-8dc9-619ca436e548@email.android.com> <20150313151628.cc840cdef745f8947c944afd@gmail.com> <20150313222829.2423b7f6@digimed.co.uk> <20150314000034.10ed9854@hal9000.localdomain> <20150314011632.53fda22f@hal9000.localdomain> <20150314060834.3492e89c7ac2e449c93a2319@gmail.com> <20150314103359.735324c1@digimed.co.uk> <20150314064742.eb3fd479e7e54df67d2af665@gmail.com> <20150317121108.711bfd50fe3a8a11383a3812@gmail.com> <20150317133323.a1145ab469b3eb8eada1fbf6@gmail.com> <3D97C856-A376-454C-9361-F624230CCE1B@iki.fi> <20150317155214.2d7a4fba289dd07a125e6bd0@gmail.com> <462A6275-708E-4A79-B148-01A257B9F476@iki.fi> X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.25; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 2b126aea-21af-43be-ad4a-bdd5cc1ed92f X-Archives-Hash: cb3ac34a0169557c1063d1b0146a4a19 On Tue, 17 Mar 2015 22:14:03 +0200 Matti Nykyri wrote: > > On Mar 17, 2015, at 21:52, German wrote: > > > > On Tue, 17 Mar 2015 20:39:46 +0200 > > Matti Nykyri wrote: > > > >>> On Mar 17, 2015, at 19:33, German wrote: > >>> > >>> On Tue, 17 Mar 2015 19:16:42 +0200 > >>> Matti Nykyri wrote: > >>> > >>>>>> On Mar 17, 2015, at 18:11, German wrote: > >>>>>> > >>>>>> Don't hit your head to a brick wall. A small strace to the login process reveals that login set things as you tell it to in /etc/login.defs > >>>>>> > >>>>>> In this file change the line: > >>>>>> TTYPERM 0600 > >>>>>> To: > >>>>>> TTYPERM 0620 > >>>>>> > >>>>>> And your problem is fixed. > >>>>> > >>>>> Sorry, this didn't fix it > >>>> > >>>> Yes. Sorry. The mode was wrong: > >>>> > >>>> TTYPERM 660 > >>>> > >>>> Will fix it, if your screen is setgid tty and ttyX is gid tty. If not then: > >>>> > >>>> TTYPERM 666 > >>>> > >>>> Will fix it, but also your tty will be world readable. If you don't consider that too big security risk, then just go > >>> > >>> Neither 660 nor 666 fixed it. Sorry :( > >> > >> If you have: > >> > >> TTYPERM 0666 > >> > >> And logout and login. What mode and ownership do you have in you tty (/dev/ttyX)? > > > > Ok, Matti, 0666 worked, now I can run screen as a user. Thanks. Do you think I have to try to run it 0660? Will it be less security risk? > > Well 0666 = 666. The reason it now worked is because you logged out and then back in. This is becaus login program only reads the /etc/login.defs-file when you login. > I pretty much sure that I logged out and logged in back after setting to 666 and it didn't work, but setting to 0666 has worked. Strange. > With mode 0666 every user on your computer can read everything (every character) you have in your screen (so not much privacy). If you set: > > TTYGROUP utmp > TTYPERM 0660 > > And have: > > -rwxr-sr-x root utmp /usr/bin/screen > > Everything will also work and you have more privacy. I'll be the only user on this system. So I guess I can leave it as it is. > > When /bin/login us run it changes ownership of the tty to the user who logs in. Su -l does not do this. That is why the screen doesn't work. ConsoleKit is the program that is responsible for many of these permission changes. Do you have that installed? I think ConsoleKit was installed when I emerged screen, but I am not sure. > > -- > -Matti > > > > -- German