newuser.sh 112 B

123
  1. #!/bin/bash
  2. useradd -M -s /usr/sbin/nologin $1
  3. [[ -z $2 ]] && echo "$1:$2" | chpasswd || echo "$1:$1" | chpasswd