Skip to content

Instantly share code, notes, and snippets.

@kennym
Created February 20, 2012 16:04
Show Gist options
  • Save kennym/1869890 to your computer and use it in GitHub Desktop.
Save kennym/1869890 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Lee el nombre de un archivo como primer argumento
for i in `more $1 `
do
# Generar un nuevo pass con `pwgen`
pass=`pwgen -1 -N 1`
# Cambiar contrasenha
echo $pass|passwd $i --stdin > /dev/null
# Imprimir usuario y pass
echo $i":"$pass
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment