#!/bin/sh
#*********************************************************************
#   Copyright (c) International Business Machines  Corp., 2000
#
#   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.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY;  without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
#   the GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program;  if not, write to the Free Software
#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
#  FILE   : ssh
#
#  PURPOSE: Tests to see that ssh rejects an invalid password
#
#  SETUP: The program `/usr/bin/expect' MUST be installed.
#
#  HISTORY:
#    03/03 Jerone Young (jeroney@us.ibm.com)
#
# DESCRIPTION:
#	Create test user
#	Make sure test user can't login with invalid password
#	Cleanup test user from system
#	Exit with exit code of script called upon

setup()
{
	tst_check_cmds ssh01_s1
	export TEST_USER="ssh_usr1"
}

TCID="ssh01"
TST_TOTAL=1

. test.sh
. ssh_setup

setup
do_setup
TST_CLEANUP=do_cleanup

ssh01_s1
if [ $? -ne 0 ]; then
	tst_resm TFAIL "Test $TCID FAIL"
else
	tst_resm TPASS "Test $TCID PASS"
fi

tst_exit
