From owner-freebsd-questions@FreeBSD.ORG Mon Oct 9 07:41:53 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70CAF16A407 for ; Mon, 9 Oct 2006 07:41:53 +0000 (UTC) (envelope-from mail@lobraun.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74FC743D76 for ; Mon, 9 Oct 2006 07:41:42 +0000 (GMT) (envelope-from mail@lobraun.de) Received: from [84.160.187.153] (helo=[192.168.0.4]) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1GWpld2DL2-00007e; Mon, 09 Oct 2006 09:41:41 +0200 From: Lothar Braun To: freebsd-questions@freebsd.org Date: Mon, 9 Oct 2006 09:41:38 +0200 User-Agent: KMail/1.9.4 References: <38221ea10610090024l5f7aebdfp6c551e3955b9cc10@mail.gmail.com> In-Reply-To: <38221ea10610090024l5f7aebdfp6c551e3955b9cc10@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610090941.41014.mail@lobraun.de> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:104f95452e150713f597d156114ee5ee Subject: Re: How to change all /bin/bash at /etc/passwd to /sbin/nologin? 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: Mon, 09 Oct 2006 07:41:53 -0000 Hi James, On Monday 09 October 2006 09:24, James Corteciano wrote: > How to change all word lines of /bin/bash at /etc/passwd file to > /sbin/nologin in just a single line command? I think you can do this with: sed 's!/bin/bash$!/sbin/nologin!' /etc/passwd > /etc/passwd Best regards, Lothar