Created
September 14, 2020 01:45
-
-
Save maryori12/eef300af83adf74da30510c5aeff5ea8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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="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