#!/bin/sh # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # bos720 src/bos/usr/lpp/bosinst/samples/AE/AS/ConfigPWD2.sh 1.1 # # Licensed Materials - Property of IBM # # COPYRIGHT International Business Machines Corp. 2008,2009 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # @(#)36 1.1 src/bos/usr/lpp/bosinst/samples/AE/AS/ConfigPWD2.sh, bosinst, bos720 3/29/09 15:20:15 # # A utility for changing the user password. # # usage: sh ConfigPWD -username "username" -password "password" while [ $# -ne 0 ] do case $1 in -username*) username=$2 ;; -password*) password=$2 ;; *) ;; esac shift 2 done # -c option for chpasswd is same as pwdadm -c $username echo "$username:$password" | chpasswd -c