在执行脚本时老出现如下错误:

 'AUTH GSSAPI': command not understood

 'AUTH KERBEROS_V4': command not understood

KERBEROS_V4 rejected as an authentication type


原脚本如下:

#!/bin/sh
export ORACLE_BASE=/opt/oracle/
export ORACLE_HOME=/opt/oracle/app/product/11.2.0/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin:.
export ORACLE_SID=sms
timedate=$(date +%Y%m%d%H%M%S)
dumpdbname=sms
#export NLS_LANG=american_america.UTF8
#export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
CURDATE=$(date '+%Y%m%d%H%M%S')
backup_directory=/opt/backup/data
expdp  sms/1@orcl directory=backDir dumpfile=$dumpdbname'_'$timedate.dmp logfile=$dumpdbname'_'$timedate.log
cd /opt/backup
zip -r data/$dumpdbname'_'$timedate.zip data/$dumpdbname'_'$timedate.dmp data/$dumpdbname'_'$timedate.log
find $backup_directory/*.log -mtime +10 -exec rm -rf {} \;
find $backup_directory/*.zip -mtime +10 -exec rm -rf {} \;
find $backup_directory/*.dmp -mtime +10 -exec rm -rf {} \;

cd $backup_directory
ftp -v -n 192.168.2.4 >> ${dumpdbname}_${timedate}.log << EOF
user jw j22w
binary
hash
put ${dumpdbname}_${timedate}.zip ${dumpdbname}_${timedate}.zip
bye
EOF
exit 0

这个脚本是到linux上下载文件,但是运行的时候报错,关键字有:

AUTH GSSAP

AUTH KERBEROS_V4


解决办法:

ftp -v -n -u << EOF

加-u参数可以解决以下报错

'AUTH GSSAPI': command not understood

'AUTH KERBEROS_V4': command not understood