5
1
I am writing a program to disable users from a system, i want to replace /bin/bash
to /bin/false.
Example
xxx:x:1:22:xx:/export/home/xx:**/bin/bash**
replace to
xxx:x:1:22:xx:/export/home/xx:**/bin/false**
I want do with using bash script.
I know one way to do this is using sed
. But i am not good at regular expressions.
Can any one help?
mv /bin/bash /tmp/bin/false – Stepo – 2013-02-27T17:07:38.820
5@Stepo That just makes
/bin/bash
unavailable to everyone. – chepner – 2013-02-27T17:08:55.953ah gosh, I see. you're right! – Stepo – 2013-02-27T17:10:29.090