Date: Mon, 9 Oct 2006 10:45:48 +0200 From: Lothar Braun <mail@lobraun.de> To: freebsd-questions@freebsd.org Cc: Matthias Apitz <m.apitz@oclcpica.org>, James Corteciano <freebsd@gascort.com> Subject: Re: How to change all /bin/bash at /etc/passwd to /sbin/nologin? Message-ID: <200610091045.51211.mail@lobraun.de> In-Reply-To: <20061009080338.GA2184@rebelion.Sisis.de> References: <38221ea10610090024l5f7aebdfp6c551e3955b9cc10@mail.gmail.com> <200610090941.41014.mail@lobraun.de> <20061009080338.GA2184@rebelion.Sisis.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610091045.51211.mail>