#!/bin/bash

LISTA_GRUPOS_SECUNDARIOS=( "profesor" "dialout" "cdrom" "audio" "video" "epoptes" )
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