Last active
September 13, 2020 01:16
-
-
Save allexiusw/14f242c460705d74d3a36ade7a2f33b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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