亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: 報(bào)錯(cuò)腳本~ [打印本頁(yè)]

作者: zcsmart    時(shí)間: 2010-07-08 15:41
標(biāo)題: 報(bào)錯(cuò)腳本~
寫了以下code:

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

下面運(yùn)行報(bào)錯(cuò):
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.

如何解釋?
作者: lkk2003rty    時(shí)間: 2010-07-08 15:44
本帖最后由 lkk2003rty 于 2010-07-08 16:17 編輯

在bye下一行補(bǔ)上
!
注意 頂格寫
作者: bbgg1983    時(shí)間: 2010-07-08 15:47
少了尾巴
作者: where27    時(shí)間: 2010-07-08 15:50
在bye下一行補(bǔ)上
lkk2003rty 發(fā)表于 2010-07-08 15:44



    直接加上!就行了吧,還要<<做什么呢..
作者: lkk2003rty    時(shí)間: 2010-07-08 16:17
回復(fù) 4# where27


    悲劇啊   復(fù)制黏貼了下  還邊和同事說(shuō)話  我編輯
作者: wild_li    時(shí)間: 2010-07-08 17:34
悲劇....................
作者: zcsmart    時(shí)間: 2010-07-09 10:57
加了尾巴還是報(bào)錯(cuò):

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.


貌似是某種功能不支持
作者: todayhero    時(shí)間: 2010-07-09 11:55
看LZ好像是實(shí)現(xiàn)自動(dòng)登錄功能,看看下面的腳本!
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
復(fù)制代碼

作者: Shell_HAT    時(shí)間: 2010-07-09 12:08
回復(fù) 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
復(fù)制代碼

作者: zcsmart    時(shí)間: 2010-07-09 12:16
回復(fù) 8# todayhero

能轉(zhuǎn)成我的腳本么?里面有些東西沒(méi)有接觸過(guò)
作者: Shell_HAT    時(shí)間: 2010-07-09 12:47
回復(fù) 10# zcsmart


沒(méi)有必要,登錄ftp不需要expect。
作者: zcsmart    時(shí)間: 2010-07-09 12:52
回復(fù) 11# Shell_HAT


    有別的方法么?試了不行




歡迎光臨 Chinaunix (http://www.72891.cn/) Powered by Discuz! X3.2