Add Users to Unix

Why not add some thousand users to your machine?

  • adduser is friendlier than useradd.

Some code, though:

#! /bin/bash
NAME=$1 # or whatever you want to name it
 
[ "$NAME" == "" ] && exit
useradd -d /home/$NAME -s /bin/bash -p w $NAME
 
mkdir /home/$NAME
cp /root/.bashrc /home/$NAME
chown -R $NAME /home/$NAME
chmod -R 700 /home/$NAME