|
If manipulating the passwd file directly I would suggest you use the safer alternative which is awk.
In this case however, why not just use the system provided command for doing this, usually the passwd or usermod commands have an option for locking accounts.
|