| #!/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 username |
| # |
| # SETUP: The program `/usr/bin/expect' MUST be installed. |
| # |
| # HISTORY: |
| # 03/03 Jerone Young (jeroney@us.ibm.com) |
| # |
| # DESCRIPTION: |
| # Create Test User |
| # Make sure an invalid user can not have access |
| # Cleanup Test User from system |
| # Exit with exit code of script called upon |
| |
| setup() |
| { |
| tst_check_cmds ssh02_s1 |
| export TEST_USER="ssh_usr2" |
| } |
| |
| TCID="ssh02" |
| TST_TOTAL=1 |
| |
| . test.sh |
| . ssh_setup |
| |
| setup |
| do_setup |
| TST_CLEANUP=do_cleanup |
| |
| ssh02_s1 |
| if [ $? -ne 0 ]; then |
| tst_resm TFAIL "Test $TCID FAIL" |
| else |
| tst_resm TPASS "Test $TCID PASS" |
| fi |
| |
| tst_exit |