1#!/bin/sh 2#********************************************************************* 3# Copyright (c) International Business Machines Corp., 2000 4# 5# This program is free software; you can redistribute it and/or modify 6# it under the terms of the GNU General Public License as published by 7# the Free Software Foundation; either version 2 of the License, or 8# (at your option) any later version. 9# 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 13# the GNU General Public License for more details. 14# 15# You should have received a copy of the GNU General Public License 16# along with this program; if not, write to the Free Software 17# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18# 19# FILE : ssh 20# 21# PURPOSE: Tests to see that ssh rejects an invalid password 22# 23# SETUP: The program `/usr/bin/expect' MUST be installed. 24# 25# HISTORY: 26# 03/03 Jerone Young (jeroney@us.ibm.com) 27# 28# DESCRIPTION: 29# Create test user 30# Make sure test user can't login with invalid password 31# Cleanup test user from system 32# Exit with exit code of script called upon 33 34setup() 35{ 36 tst_check_cmds ssh01_s1 37 export TEST_USER="ssh_usr1" 38} 39 40TCID="ssh01" 41TST_TOTAL=1 42 43. test.sh 44. ssh_setup 45 46setup 47do_setup 48TST_CLEANUP=do_cleanup 49 50ssh01_s1 51if [ $? -ne 0 ]; then 52 tst_resm TFAIL "Test $TCID FAIL" 53else 54 tst_resm TPASS "Test $TCID PASS" 55fi 56 57tst_exit 58