Skip to content

Instantly share code, notes, and snippets.

@maryori12
Created September 14, 2020 01:45
Show Gist options
  • Save maryori12/eef300af83adf74da30510c5aeff5ea8 to your computer and use it in GitHub Desktop.
Save maryori12/eef300af83adf74da30510c5aeff5ea8 to your computer and use it in GitHub Desktop.
#!/bin/bash
USER1="KEVIN"
USER2="MARYORI"
USER3="OMARYORI"
GROUP="elmejor"
echo "Iniciando la creacion de usuarios"
#crea el usuario Kevin
useradd -m -d /home/$USER1 -s /bin/bash $USER1
#crea el usuario Maryori
useradd -m -d /home/$USER2 -s /bin/bash $USER2
#crea el usuario Omayori
useradd -m -d /home/$USER3 -s /bin/bash $USER3
#crea el grupo elmejor
groupadd $GROUP
#agrega al grupo elmejor
Usermod -a -G $GROUP $USER1
Usermod -a -G $GROUP $USER2
Usermod -a -G $GROUP $USER3
echo "Usuarios y grupos creados con exito"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment