the stuff

heads-rootpw 588B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. #
  3. # Copyright (c) 2018 Ivan J. <parazyd@dyne.org>
  4. # See LICENSE file for copyright and license details.
  5. input_pw() {
  6. yad \
  7. --title="Change the root password" \
  8. --text="<b>Change the root password</b>
  9. Enter the root password which you wish to use:" \
  10. --no-escape \
  11. --borders=40 \
  12. --image="/usr/share/icons/Adwaita/64x64/apps/system-users-symbolic.symbolic.png" \
  13. --image-on-top \
  14. --center \
  15. --fixed \
  16. --width=360 \
  17. --height=100 \
  18. --entry \
  19. --button="<b>Accept</b>":0
  20. }
  21. pw=""
  22. while [ -z "$pw" ]; do
  23. pw="$(input_pw)"
  24. done
  25. echo "root:${pw}" | chpasswd