Πρόβλημα με nxnode-login στο FreeNX
Argiris Mokios
amok at auth.gr
Fri Dec 16 11:14:16 EET 2005
Καλημέρα,
προσπαθώ να εγκαταστήσω FreeNX σε ένα suse 9.3 pc(server),
ώστε να δοκιμάσω πως δουλεύει με dial up συνδέσεις από άλλους
linux kai windows clients.
Έχω επιλέξει να εγκαταστήσω τον nxserver ώστε να πιστοποιεί
τους clients μέσω public - private key auth και να αποδέχεται
login από τους users με τα username - passwords των accounts
που ήδη έχουν στον server.
Μετά από διάφορα προβλήματα, πλέον πραγματοποιείται authentication
με τα κλειδία αλλά υπάρχει πρόβλημα με το nxnode-login. Δηλαδή:
NX> 203 NXSSH running with pid: 16429601
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 200 Connected to address: xx.xx.xx.xx on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 1.4.0-44 OS (GPL)
NX> 105 hello NXCLIENT - Version 1.5.0
NX> 134 Accepted protocol: 1.5.0
NX> 105 SET SHELL_MODE SHELL
NX> 105 SET AUTH_MODE PASSWORD
NX> 105 login
NX> 101 User: user1
NX> 102 Password:
expect: spawn id exp3 not open
while executing
"expect -nobrace {Are you sure you want to continue connecting
(yes/no)?} { send "yes\r" } assword*: { sleep 0.3; send "$password\r" }
{Permission deni..."
invoked from within
"expect {
"Are you sure you want to continue connecting (yes/no)?" { send
"yes\r" }
"assword*:" { sleep 0.3; send "$password\r" }
"Permission de..."
("while" body line 2)
invoked from within
"while {1} {
expect {
"Are you sure you want to continue connecting (yes/no)?" { send
"yes\r" }
"assword*:" { sleep 0.3; send "$password\r" }
"..."
(file "/usr/bin/nxnode-login" line 34)
NX> 280 Ignoring EOF on the monitored channel
NX> 280 Ignoring CLOSE on the monitored channel
NX> 404 ERROR: wrong password or login
NX> 999 Bye
Έκανα αρκετό googling αλλά δυστυχώς δεν βρήκα κάτι που να βοηθάει. Μήπως
μπορεί
να μου πει κανείς τι προσπαθεί να κάνει το expect script με το
συγκεκριμένο while loop?
===========================nxnode-login===================================
#!/usr/bin/expect
# nxnode-login: spawns and controls ssh
# Copyright (c) 2004 by Fabian Franz.
# License: GPL, version 2
#
# CVS: $Id: nxnode-login,v 1.13 2005/07/27 14:34:59 fabianx Exp $
#
# Syntax: nxnode-login {ssh|su} user ssh-port executable command tosend
set auth_method [lindex $argv 0]
set user [lindex $argv 1]
set port [lindex $argv 2]
set executable [lindex $argv 3]
set command [lindex $argv 4]
set tosend [lindex $argv 5]
catch {set tosend $env(NXNODE_TOSEND)}
set command_ssh "ssh"
catch {set command_ssh $env(COMMAND_SSH)}
expect_user -re "(.*)\n"
set password $expect_out(1,string)
set stty_init "raw icrnl -echo"
if { "$auth_method"=="ssh" } {
set pid [spawn -noecho $command_ssh -2 -x -l "$user" "127.0.0.1" -o
"NumberOfPasswordPrompts 1" -p "$port" "$executable $command" ]
} elseif { "$auth_method"=="su" } {
set pid [spawn -noecho su - "$user" -c "$executable $command" ]
} else {
exit 1
}
while {1} {
expect {
"Are you sure you want to continue connecting (yes/no)?" { send
"yes\r" }
"assword*:" { sleep 0.3; send "$password\r" }
"Permission denied*" { exit 1 }
"su: Authentication failure" { exit 1 }
"NX> 1000 NXNODE - Version" {
break
}
}
}
if { "$tosend"!="" } {
send "$tosend\r"
}
expect {
"NX> 716 finished" { }
"NX> 700" {
set timeout -1
expect {
"NX> 1001 Bye." { exit 0 }
"NX> *" { exp_continue }
}
exit 0
}
"NX> 716 Public key is already present in:" { }
"NX> 716 Public key added to:" { }
"NX> 716 Terminating session * on user request." { }
"NX> 716 Suspending session * on user request." { }
"NX> 500 Error: " { exit 1}
}
expect "NX> 1001 Bye."
======================================================================
Sorry για το εκτενές post.
--
Epur Si Muove
More information about the Linux-greek-users
mailing list