Skip to content

Instantly share code, notes, and snippets.

@jurandysoares
Created August 6, 2025 04:58
Show Gist options
  • Select an option

  • Save jurandysoares/468e1226723277e88b86ff58c6338c55 to your computer and use it in GitHub Desktop.

Select an option

Save jurandysoares/468e1226723277e88b86ff58c6338c55 to your computer and use it in GitHub Desktop.
Cria conta de animais no Linux com shell zsh
#!/bin/zsh
curl -LO https://mange.ifrn.edu.br/csv/emojis-animais.csv
groupadd animal
tail +2 emojis-animais.csv | while IFS=, read emoji name nome; do
useradd -m -s /bin/zsh -c "${(C)nome},${name},${emoji}" "${nome}"
echo "${nome}:${name}" | chpasswd
chage -d 0 "${nome}"
usermod -aG animal "$animal"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment