其他分享
首页 > 其他分享> > ftp脚本遇到AUTH GSSAPI错误

ftp脚本遇到AUTH GSSAPI错误

作者:互联网

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

 '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 -n -u << EOF

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

'AUTH GSSAPI': command not understood

'AUTH KERBEROS_V4': command not understood




标签:ftp,dumpdbname,GSSAPI,AUTH,timedate,export,directory,backup
来源: http://blog.51cto.com/meiling/2348537