Tag Archives: bash

Changing Linux User’s Password in One Command Line

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.

Read More

Bash Programming Cheat Sheet

Bash Programming Cheat Sheet.

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.

Basics

All bash scripts must tell the o/s what to use as the interpreter. The first line of any script should be:

#!/bin/bash

You must make bash scripts executable.

chmod +x filename

Read More

Bad Behavior has blocked 333 access attempts in the last 7 days.