Created
October 8, 2016 20:10
-
-
Save aduartem/16dfa7b44033e38b327eef0667974d53 to your computer and use it in GitHub Desktop.
Herramienta para crear usuario en Debian
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 | |
# Autor: Andrés Duarte M. | |
# Crear usuario en linux | |
echo "Ingresa nombre de usuario:" | |
read user | |
useradd $user | |
passwd $user | |
userDir="/home/"$user | |
echo "Creando directorio de usuario "$userDir | |
mkdir $userDir | |
chown $user":"$user -R $userDir | |
chmod 755 -R $userDir | |
usermod -d $userDir $user # Asignar el directorio de usuario al nuevo usuario | |
nano /etc/passwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment