summaryrefslogtreecommitdiff
path: root/localpasswd
blob: 790f10f504f19c8ab8025d0bb2a1d53e702efc30 (plain)
  1. #!/bin/sh
  2. #
  3. # /usr/local/bin/localpasswd
  4. # Copyright 2003 Jonas Smedegaard <dr@jones.dk>
  5. #
  6. # $Id: localpasswd,v 1.1 2003-12-17 14:53:28 jonas Exp $
  7. #
  8. # Execute passwd through sudo
  9. #
  10. # TODO: Check for bad arguments
  11. # TODO: Only allow handling regular users
  12. #
  13. sudo=sudo
  14. [ "$(id -u)" -ne 0 ] || sudo=
  15. exec $sudo /usr/bin/passwd $1