From owner-freebsd-questions@FreeBSD.ORG Fri Apr 25 16:41:09 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 057221065674 for ; Fri, 25 Apr 2008 16:41:09 +0000 (UTC) (envelope-from d.hill@yournetplus.com) Received: from duane.dbq.yournetplus.com (duane.dbq.yournetplus.com [65.124.230.214]) by mx1.freebsd.org (Postfix) with ESMTP id B3E698FC15 for ; Fri, 25 Apr 2008 16:41:08 +0000 (UTC) (envelope-from d.hill@yournetplus.com) Received: by duane.dbq.yournetplus.com (Postfix, from userid 1001) id B849E27E428; Fri, 25 Apr 2008 16:41:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by duane.dbq.yournetplus.com (Postfix) with ESMTP id B5D6427E423; Fri, 25 Apr 2008 16:41:07 +0000 (UTC) Date: Fri, 25 Apr 2008 16:41:07 +0000 (UTC) From: D Hill X-X-Sender: d.hill@duane.dbq.yournetplus.com To: Chuck Swiger In-Reply-To: Message-ID: References: <1209131161.14700.4.camel@puk> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Cc: Geert Geurts , freebsd-questions@freebsd.org Subject: Re: restrict ssh access X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2008 16:41:09 -0000 On Fri, 25 Apr 2008 at 09:30 -0700, cswiger@mac.com confabulated: > On Apr 25, 2008, at 6:46 AM, Geert Geurts wrote: >> I've got a server running a ssh server, I want to enable ssh for the use >> of sftp by a group of users, and limit their ssh access to just allow >> running passwd so they can change their default password. What whould be >> the best/easiest way to acomplish this, or something similiar? > > I wonder what would happen if you gave them a shell of "/usr/bin/passwd"...? > :-) That should work. I just tested. When an ssh connection is made, it executes passwd. As soon as the password is changed, the ssh connection was closed: %ssh -l asdf 192.168.1.50 Password: ... Changing local password for asdf Old Password: New Password: Retype New Password: Connection to 192.168.1.50 closed.