the stuff

heads-generate-passphrase 846B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. #
  3. # Copyright (c) 2016-2018 Ivan J. <parazyd@dyne.org>
  4. # See LICENSE file for copyright and license details.
  5. #
  6. # this will generate a random passphrase for the root password
  7. # runs on boot through rc.local
  8. ## XXX: will be reintroduced after testing phase (1.0)
  9. #pass="$(echo "$(shuf -n 2 /usr/share/dict/words --random-source=/dev/urandom | tr '\n' '-' | rev | cut -c 2- | rev)")"
  10. pass="toor"
  11. echo "root:${pass}" | chpasswd
  12. [ $? = 0 ] || return 1
  13. cat <<EOF >> /home/luther/.zshrc
  14. clear
  15. cat <<EOM
  16. Welcome to heads!
  17. * To start the graphical interface, run 'startx'
  18. Default is the entry you have booted. You can switch them by
  19. running 'startopenbox' or 'startawesome'.
  20. * The root login password (without the quotes) is: '${pass}'
  21. * The password will not be shown again.
  22. EOM
  23. sed -i -e '/^zrclocal/q' /home/luther/.zshrc
  24. EOF