Skip to content

Instantly share code, notes, and snippets.

@allexiusw
Last active September 13, 2020 01:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save allexiusw/14f242c460705d74d3a36ade7a2f33b9 to your computer and use it in GitHub Desktop.
Save allexiusw/14f242c460705d74d3a36ade7a2f33b9 to your computer and use it in GitHub Desktop.
#!/bin/bash
USER1="fabricio"
USER2="maria"
GROUP="admin"
echo "Iniciando la creación de usuarios"
#crea el usuario martir
useradd -m -d /home/$USER1 -s /bin/bash $USER1
#crea el usuario martir
useradd -m -d /home/$USER2 -s /bin/bash $USER2
#crea el grupo admin
groupadd $GROUP
#agregar al grupo admin
usermod -a -G $GROUP $USER1
usermod -a -G $GROUP $USER2
echo "Usuarios ${USER1} y ${USER2} y grupo ${GROUP} creados con exíto"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment