How to change all /bin/bash at /etc/passwd to /sbin/nologin?
freebsd at gascort.com
Mon Oct 9 02:18:45 PDT 2006
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.
On 10/9/06, Lothar Braun <mail at 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
> of my advice :/
> -- Lothar
James G. Corteciano
More information about the freebsd-questions