How to change all /bin/bash at /etc/passwd to /sbin/nologin?
Cristian Mijea
cristian.mijea at gmail.com
Mon Oct 9 00:51:15 PDT 2006
On 10/9/06, James Corteciano <freebsd at gascort.com> 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 freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
if you have mc (midnight commander) browse to /etc/passwd, edit -> replace
if you don't then
pkg_add -r mc
or
vi /etc/passwd
:%s//bin/bash//sbin/nologin/cg (:%s/oldstring/newstring/cg)
ZZ
More information about the freebsd-questions
mailing list