#!/bin/bash
useradd -m -s /bin/bash $1
mkdir /home/$1/.ssh && touch /home/$1/.ssh/authorized_keys && chmod 700 /home/$1/.ssh && chmod 600 /home/$1/.ssh/authorized_keys && chown -R $1:$1 /home/$1/.ssh/
usermod -aG admins $1
chage --mindays 0 --maxdays $2 --warndays 7 $1
chage -l $1
