#!/bin/bash

#LISTA_GRUPOS_SECUNDARIOS=("profesor" "dialout" "cdrom" "audio" "video" "nopasswdlogin")
LISTA_GRUPOS_SECUNDARIOS=("profesor" "dialout" "cdrom" "audio" "video")
if getent passwd profesor &> /dev/null ; then
    echo "=> Degradamos la cuenta de usuario de profesor"
    usermod \
    -G "$(echo "${LISTA_GRUPOS_SECUNDARIOS[*]}" | tr -s " " ",")" \
    profesor
fi