How to change all /bin/bash at /etc/passwd to /sbin/nologin?

pbdlists at pbdlists at
Mon Oct 9 00:50:05 PDT 2006

sed -i .backup "s,:/bin/bash$,:/sbin/nologin," /etc/passwd 

But at least on my FBSD systems bash is in /usr/local/bin/bash, not
/bin/bash! And what would you need this for?



On Mon, Oct 09, 2006 at 03:24:30PM +0800, James Corteciano wrote:
> Dear guru's:
> How to change all word lines of /bin/bash at /etc/passwd file to
> /sbin/nologin in just  a single line command?
> I am looking forward for your great responses.
> Thank you.
> Regards,
> -- 
> James G. Corteciano
> FreeBSD User
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list