Issues Authenticating - OpenSolaris

51 views
Skip to first unread message

The_Nerd

unread,
Oct 31, 2009, 12:42:05 AM10/31/09
to neatx
I've managed to overcome a few hurdles but still no luck running neatx
on OpenSolaris.

I've compiled it against GNU/Linux world binaries, I'm using OpenSSH
(because SunSSH seemed to give it problems) but I'm stuck again.

I get the following output from the NX Client 3.4.0:
NX> 203 NXSSH running with pid: 3252
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: 192.168.1.115 on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 3.3.0 - GPL
NX> 105 Hello nxclient - version 3.3.0
NX> 134 Accepted protocol: 3.3.0
NX> 105 Set SHELL_MODE: SHELL
NX> 105 Set AUTH_MODE: PASSWORD
NX> 105 Login
NX> 101 User:
NX> 102 Password: **********
NX> 500 Internal error
NX> 999 Bye.
NX> 404 ERROR: wrong password or login.
NX> 280 Exiting on signal: 15

I've been able to authenticate just fine by doing:

will@opensolaris:~# su - nx
HELLO NXSERVER - Version 3.3.0 - GPL
NX> 105 login
Login
NX> 101 User: will

NX> 102 Password: **********
NX> 103 Welcome to: localhost user: will
NX> 105

So I assume the problem is with authentication coming in from SSH and
passing the process off to neatx. Logging, despite my best efforts,
does not seem to output anything, anywhere.

Anything else I can check or try?

Stephen Shirley

unread,
Dec 1, 2009, 3:47:09 PM12/1/09
to ne...@googlegroups.com
On Sat, Oct 31, 2009 at 05:42, The_Nerd <the....@gmail.com> wrote:
> NX> 500 Internal error

This will cause a bunch of debug logging, which should detail the
underlying problem.

> So I assume the problem is with authentication coming in from SSH and
> passing the process off to neatx. Logging, despite my best efforts,
> does not seem to output anything, anywhere.

The lack of logs is the biggest issue right now - without those, we
can't figure out what's going wrong. Neatx logs everything under the
USER facility. On linux at least, that means /var/log/user.log. If you
don't see anything there, have a look at /etc/syslog.conf (just
guessing) for any lines beginning with "user.".

Steve
--
"You are technically correct, the best kind of correct."
- Bureaucrat 1.0, Futurama

The_Nerd

unread,
Dec 2, 2009, 10:11:33 AM12/2/09
to neatx
Got the logs! For anyone using OpenSolaris, they'll be in /var/adm/
messages

Dec 2 10:03:07 opensolaris gnome-session[590]: [ID 702911
daemon.warning] WARNING: Could not connect to ConsoleKit: Could not
get owner of name 'org.freedesktop.ConsoleKit': no such name
Dec 2 10:03:36 opensolaris last message repeated 1 time
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] ERROR protocol:165 Error while handling line 'login'
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] Traceback (most recent call last):
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] File "/usr/local/lib/python2.4/site-packages/neatx/
protocol.py", line 161, in _HandleLine
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] self._handler(line)
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] File "/usr/local/lib/python2.4/site-packages/neatx/app/
nxserver_login.py", line 76, in __call__
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] return self._Login(args)
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] File "/usr/local/lib/python2.4/site-packages/neatx/app/
nxserver_login.py", line 169, in _Login
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] self._TryLogin(username, password)
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] File "/usr/local/lib/python2.4/site-packages/neatx/app/
nxserver_login.py", line 259, in _TryLogin
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] authenticator.AuthenticateAndRun(username, password,
args)
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] File "/usr/local/lib/python2.4/site-packages/neatx/
auth.py", line 71, in AuthenticateAndRun
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] timeout=30)
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] File "/usr/lib/python2.4/vendor-packages/pexpect.py",
line 429, in __init__
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] self._spawn (command, args)
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] File "/usr/lib/python2.4/vendor-packages/pexpect.py",
line 531, in _spawn
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] self.pid, self.child_fd = self.__fork_pty()
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] File "/usr/lib/python2.4/vendor-packages/pexpect.py",
line 592, in __fork_pty
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] self.__pty_make_controlling_tty(child_fd)
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] File "/usr/lib/python2.4/vendor-packages/pexpect.py",
line 615, in __pty_make_controlling_tty
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] fd = os.open("/dev/tty", os.O_RDWR | os.O_NOCTTY);
Dec 2 10:04:34 opensolaris nxserver-login[1024]: [ID 702911
user.error] OSError: [Errno 6] No such device or address: '/dev/tty'
Dec 2 10:04:34 opensolaris nxserver-login[1021]: [ID 702911
user.error] ERROR nxserver_login:261 Authentication failed
Dec 2 10:04:34 opensolaris nxserver-login[1021]: [ID 702911
user.error] Traceback (most recent call last):
Dec 2 10:04:34 opensolaris nxserver-login[1021]: [ID 702911
user.error] File "/usr/local/lib/python2.4/site-packages/neatx/app/
nxserver_login.py", line 259, in _TryLogin
Dec 2 10:04:34 opensolaris nxserver-login[1021]: [ID 702911
user.error] authenticator.AuthenticateAndRun(username, password,
args)
Dec 2 10:04:34 opensolaris nxserver-login[1021]: [ID 702911
user.error] File "/usr/local/lib/python2.4/site-packages/neatx/
auth.py", line 113, in AuthenticateAndRun
Dec 2 10:04:34 opensolaris nxserver-login[1021]: [ID 702911
user.error] raise errors.AuthFailedError(("Authentication failed
(output=%r, "
Dec 2 10:04:34 opensolaris nxserver-login[1021]: [ID 702911
user.error] AuthFailedError: Authentication failed (output='',
exitstatus=None, signum=None)

I'm no expert but it looks like pexpect is having problems opening /
dev/tty. I can confirm that /dev/tty exists but I'm unsure of how
neatx is interacting with it. I'll try to dig though the code and run
the auth commands manually. If anyone can make any better sense of
what's going on, I'd love the help!

On Dec 1, 3:47 pm, Stephen Shirley <kor...@gmail.com> wrote:

Stephen Shirley

unread,
Dec 6, 2009, 2:32:48 PM12/6/09
to ne...@googlegroups.com
On Wed, Dec 2, 2009 at 16:11, The_Nerd <the....@gmail.com> wrote:
> I'm no expert but it looks like pexpect is having problems opening /
> dev/tty.

Indeed, pexpect's is getting "file does not exist" when it tries to
open /dev/tty.

> I can confirm that /dev/tty exists but I'm unsure of how
> neatx is interacting with it.

/dev/tty is a special file that always refers to the current process's
tty. In the above, i'm guessing that for some reason neatx doesn't
have a tty assosciated with it. Or possibly your version of pexpect
has a bug relating to OpenSolaris. Here's the comment at the top of
the function from the version i'm using:

def __pty_make_controlling_tty(self, tty_fd):
"""This makes the pseudo-terminal the controlling tty.
This should be more portable than the pty.fork() function.
Specifically, this should work on Solaris.
Reply all
Reply to author
Forward
0 new messages