I frequently create new user accounts and change or set password for these accounts on a batch of Linux boxes. The create new user can be done by one command line. The problem is to change the password. In Linux, we use passwd to change password, but passwd requires input from stdin to get the new password. With the help of pipe and a little tricky, we can change user’s password in one command line. This will save much time especially when creating a batch of user accounts.
Tag Archives: bash
A quick cheat sheet for programmers who want to do shell scripting. This is not intended to teach programming, etc. but it is intended for a someone who knows one programming language to begin learning about bash scripting.
All bash scripts must tell the o/s what to use as the interpreter. The first line of any script should be:
You must make bash scripts executable.
chmod +x filename
Bash Dev: http://devmanual.gentoo.org/tools-reference/index.html