|
@@ -1,65 +0,0 @@
|
|
|
-#!/bin/bash
|
|
|
-#Guzmán Castanedo (guzman@castanedo.es) Octubre 2017
|
|
|
-#Licencia: GPL3 (http://www.gnu.org/licenses/gpl-3.0.html)
|
|
|
-
|
|
|
-function escalarPrivilegios {
|
|
|
-#Comprobar si somos root e intentar conseguir los privilegios
|
|
|
-}
|
|
|
-
|
|
|
-function menu {
|
|
|
-#Muestra menu y captura respuesta
|
|
|
- if [ $error = false ]; then
|
|
|
- clear
|
|
|
- fi
|
|
|
- printf "/---------------------------------------\\ \n"
|
|
|
- printf "|\tADMINISTRACION DE USUARIOS:\t|\n"
|
|
|
- printf "\\---------------------------------------/\n"
|
|
|
- printf "\t1.\tDar de ALTA Usuario\n"
|
|
|
- printf "\t2.\tCambio de Clave\n"
|
|
|
- printf "\t3.\tDat de BAJA Usuario\n"
|
|
|
- printf "\t4.\tBLOQUEAR Usuario\n"
|
|
|
- printf "\t5.\tDESBLOQUEAR Usuario\n"
|
|
|
- printf "\ts.\tDar de ALTA Usuario\n"
|
|
|
- printf "\tOPCION:\t>"
|
|
|
- read Opcion
|
|
|
- printf "\n"
|
|
|
-}
|
|
|
-
|
|
|
-escalarPrivilegios
|
|
|
-cont=true
|
|
|
-error=false
|
|
|
-while [ $cont = true ]; do
|
|
|
- menu
|
|
|
- case $Opcion in
|
|
|
- 1)
|
|
|
- #Alta usuario
|
|
|
- ;;
|
|
|
- 2)
|
|
|
- #Cambiar passwd
|
|
|
- ;;
|
|
|
- 3)
|
|
|
- #Baja usuario
|
|
|
- ;;
|
|
|
- 4)
|
|
|
- #Bloquear usuario
|
|
|
- ;;
|
|
|
- 5)
|
|
|
- #Desbloquear usuario
|
|
|
- ;;
|
|
|
- s|S|q|Q)
|
|
|
- #Salida
|
|
|
- #Podreamos hacer break, pero los bucles infinitos son feos.
|
|
|
- cont=false
|
|
|
- ;;
|
|
|
- *)
|
|
|
- #Opcion Incorrecta
|
|
|
- clear
|
|
|
- printf "\tOPCION INCORRECTA.\n"
|
|
|
- error=true
|
|
|
- continue
|
|
|
- ;;
|
|
|
- esac
|
|
|
- error=false
|
|
|
-done
|
|
|
-
|
|
|
-exit
|