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?

Cheers,

Kurt

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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to