#! /bin/sh #---------------------------------------------------------------------------- # /var/install/bin/change-password - change password of a user # # Creation: 2001-11-04 fm # Last Update: $Id$ # # Copyright (c) 2001-@@YEAR@@ the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # include eislib . /var/install/include/eislib clrhome mecho --info "Change password" echo echo /var/install/bin/ask "User:" '' '*' > /tmp/ask.$$ rc=$? user=$(cat /tmp/ask.$$) rm -f /tmp/ask.$$ if [ $rc = 255 ] then exit 1 fi if [ "$user" != "" ] then echo grep "^$user:" /etc/passwd >/dev/null if [ $? = 0 ] then #echo "Changing password of user $user:" passwd $user else echo mecho --warn "User $user does not exist!" anykey exit 1 fi else echo mecho --warn "Command aborted" anykey exit 1 fi echo anykey