From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 30 16:20:25 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA99416A4CE for ; Mon, 30 Aug 2004 16:20:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3A2943D1D for ; Mon, 30 Aug 2004 16:20:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i7UGKP7F077391 for ; Mon, 30 Aug 2004 16:20:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7UGKP9V077390; Mon, 30 Aug 2004 16:20:25 GMT (envelope-from gnats) Date: Mon, 30 Aug 2004 16:20:25 GMT Message-Id: <200408301620.i7UGKP9V077390@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Ceri Davies Subject: Re: bin/71147: sshd(8) will allow to log into a locked account X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ceri Davies List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2004 16:20:26 -0000 The following reply was made to PR bin/71147; it has been noted by GNATS. From: Ceri Davies To: Yar Tikhiy Cc: FreeBSD Gnats Submit Subject: Re: bin/71147: sshd(8) will allow to log into a locked account Date: Mon, 30 Aug 2004 17:16:02 +0100 On Mon, Aug 30, 2004 at 02:10:30PM +0000, Yar Tikhiy wrote: > The following reply was made to PR bin/71147; it has been noted by GNATS. > > From: Yar Tikhiy > To: Gleb Smirnoff > Cc: FreeBSD-gnats-submit@freebsd.org, des@freebsd.org > Subject: Re: bin/71147: sshd(8) will allow to log into a locked account > Date: Mon, 30 Aug 2004 18:00:21 +0400 > > On Mon, Aug 30, 2004 at 05:50:14PM +0400, Gleb Smirnoff wrote: > > On Mon, Aug 30, 2004 at 04:52:54PM +0400, Yar Tikhiy wrote: > > Y> In FreeBSD (and other BSDs,) the well-known way to lock out > > Y> a user's account is setting the user's encrypted password to > > Y> an asterisk character, `*', in master.passwd. Arguably, one > > Y> can also lock out a user by just _prefixing_ the password field > > Y> value with `*'. Anyway, sshd(8) will ignore either lock > > Y> and allow the user to log in if he authenticates himself by > > Y> means other than the Unix password, e.g., using his public key. > > > > This is not a bug, it's a feature! Any ssh (not only Open) has the > > same behavior on any unix operating system. > > Has it? The sshd(8) manpage says a different thing! And I'll be > damned if the OpenSSH code doesn't check for OS-specific lock strings > in the password hash field. > > > I'm utilizing this feature since I use pubkey authentification. > > I'm afraid it's a dangerous feature to have. Personally, I like > the way described on the sshd(8) manpage: you set the password > field exactly to the dedicated value to lock out a user completely, > or you set it to a variant to just disable password-based auth for > him. In FreeBSD the dedicated value is `*' (or, perhaps, leading > `*', as I observed in some communities), while any other character in > front of a password hash or after it will effectively deny any password > since our hashes are fixed-length, so they can't be matched by > a string of a different length. This sounds like a reasonable workaround - this way everyone gets a way to do what they want. Ceri -- It is not tinfoil, it is my new skin. I am a robot.