免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 2349 | 回复: 11
打印 上一主题 下一主题

报错脚本~ [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-07-08 15:41 |只看该作者 |倒序浏览
写了以下code:

#!/bin/sh
account="aaa"
password="bbb_123"
ftp -n "10.20.30.40" << !
user $account $password
cd /Archive
cd /txtback
bye

下面运行报错:
GSSAPI error major: Miscellaneous failure
GSSAPI error minor: No credentials cache found
GSSAPI error: initializing context
GSSAPI authentication failed
AUTH KERBEROS_V4 not supported.
KERBEROS_V4 rejected as an authentication type
/Archive: No such file or directory.
/txtback: No such file or directory.

如何解释?

论坛徽章:
0
2 [报告]
发表于 2010-07-08 15:44 |只看该作者
本帖最后由 lkk2003rty 于 2010-07-08 16:17 编辑

在bye下一行补上
!
注意 顶格写

论坛徽章:
0
3 [报告]
发表于 2010-07-08 15:47 |只看该作者
少了尾巴

论坛徽章:
0
4 [报告]
发表于 2010-07-08 15:50 |只看该作者
在bye下一行补上
lkk2003rty 发表于 2010-07-08 15:44



    直接加上!就行了吧,还要<<做什么呢..

论坛徽章:
0
5 [报告]
发表于 2010-07-08 16:17 |只看该作者
回复 4# where27


    悲剧啊   复制黏贴了下  还边和同事说话  我编辑

论坛徽章:
0
6 [报告]
发表于 2010-07-08 17:34 |只看该作者
悲剧....................

论坛徽章:
0
7 [报告]
发表于 2010-07-09 10:57 |只看该作者
加了尾巴还是报错:

GSSAPI error major: Miscellaneous failure
GSSAPI error minor: No credentials cache found
GSSAPI error: initializing context
GSSAPI authentication failed
AUTH KERBEROS_V4 not supported.
KERBEROS_V4 rejected as an authentication type
/Archive: No such file or directory.
/txtback: No such file or directory.


貌似是某种功能不支持

论坛徽章:
0
8 [报告]
发表于 2010-07-09 11:55 |只看该作者
看LZ好像是实现自动登录功能,看看下面的脚本!
yum install expect*

  1. [root@openfire root]# cat 1.sh
  2. #!/usr/bin/expect
  3. spawn ftp ftp.cn.freebsd.org
  4. expect "Name"
  5. send "ftp\r"
  6. expect "Password:"
  7. send "ftp\r"
  8. expect "apply"
  9. send "cd /pub/FreeBSD/distfiles\r"
  10. expect "successful."
  11. send "bin\r"
  12. expect "set to I"
  13. send "ls\r"
  14. expect "complete."
  15. send "quit"

  16. [root@openfire root]# expect 1.sh
复制代码

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
9 [报告]
发表于 2010-07-09 12:08 |只看该作者
回复 7# zcsmart

  1. #!/bin/sh
  2. account="aaa"
  3. password="bbb_123"
  4. ftp -n "10.20.30.40" <<End
  5. user $account $password
  6. cd /Archive
  7. cd /txtback
  8. bye
  9. End
复制代码

论坛徽章:
0
10 [报告]
发表于 2010-07-09 12:16 |只看该作者
回复 8# todayhero

能转成我的脚本么?里面有些东西没有接触过
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP