#!/bin/sh if [ -z "$1" ] || [ -z "$2" ]; then echo "Usage: $0 <username> <password>" exit 1 fi HASHED=$(openssl passwd -apr1 "$2") echo "$1:$HASHED"