Date: Mon, 9 Oct 2006 17:18:43 +0800 From: "James Corteciano" <freebsd@gascort.com> To: "Lothar Braun" <mail@lobraun.de> Cc: freebsd-questions@freebsd.org Subject: Re: How to change all /bin/bash at /etc/passwd to /sbin/nologin? Message-ID: <38221ea10610090218v667cb467vec820da3d57627de@mail.gmail.com> In-Reply-To: <200610091045.51211.mail@lobraun.de> References: <38221ea10610090024l5f7aebdfp6c551e3955b9cc10@mail.gmail.com> <200610090941.41014.mail@lobraun.de> <20061009080338.GA2184@rebelion.Sisis.de> <200610091045.51211.mail@lobraun.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Dear guru's, Thanks all you guys for the great response. Now, I've done it using text-editor of NANO and there is Find, and To Replace section which makes big help to replacing the whole word. Best regards, James Corteciano FreeBSD User On 10/9/06, Lothar Braun <mail@lobraun.de> wrote: > > On Monday 09 October 2006 10:03, Matthias Apitz wrote: > > > sed 's!/bin/bash$!/sbin/nologin!' /etc/passwd > /etc/passwd > > > > DONT DO THAT this way. The result would be that your actual > > shell truncates the file '/etc/passwd' to zero length and > > then launches the 'sed'. > > Damn. I just built the regexp but didn't check what the command does > before i > sent it to the list. Sorry for that. I hope nobody killed his pw-file > because > of my advice :/ > > -- Lothar > -- James G. Corteciano FreeBSD User
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38221ea10610090218v667cb467vec820da3d57627de>