# FreeNX authentication problem

## linuxpyro

Hello, I am trying to install FreeNX.  I installed it per the instructions in this thread: https://forums.gentoo.org/viewtopic-t-278334-highlight-freenx.html.  The emerge was successful.  I installed the client on my XP Pro box, and copied the client key into the share directory (under C:\Program Files\NX Client for Windows\share).  I added my username and password as an NX user.  Upon trying to log in from the Windows box, however, I got this error:

```

NX> 203 NXSSH running with pid: 608

NX> 285 Enabling check on switch command

NX> 285 Enabling skip of SSH config files

NX> 200 Connected to address: 192.168.1.3 on port: 22

NX> 202 Authenticating user: nx

NX> 208 Using auth method: publickey

NX> 204 Authentication failed.

```

I Googled the last few lines, and found some posts on other forums saying that the solution is to run /usr/NX/bin/nxsetup --setup-nomachine-key.  However, the file nxsetup doesn't exist under /usr/NX/bin (or anywhere for that matter).  Also, I searched the forums here but didn't find a mention of the nxsetup program.

Has anyone else had this problem?

----------

## linuxpyro

Another thing.  Here is a line from /var/log/messages that had something interesting in it.  This is from today (the 17th) when I tried to log in via nx.  (I just found it now; I don't know which login attempt triggered it.)

```

Mar 17 03:57:10 leartes usermod[27732]: change user `nx' shell from `/usr/NX/bin/nxserver' to `/usr/NX/bin/nxserver'

```

----------

## D2T

Do you have any login rules set in /etc/ssh/sshd_config? I was just setting this up the other day and was getting a similar message because nx was not allowed to log in through ssh with my ruleset.

Try adding/modifying the AllowUsers line to include nx.. Ex.:

```
AllowUsers user1 user2 nx
```

Was a simple mistake on my part and may not be your issue, but worth checking.  :Very Happy: 

----------

## linuxpyro

I tried that, but I get the same error.   :Rolling Eyes: 

----------

## linuxpyro

*Bump*

----------

## D2T

I use password authentication instead of publickey, so that's probably what's causing the difference.

Did you copy the ssh key to the computer you're trying to connect from? I think something like that may be necessary.

----------

## j-kidd

In /etc/shadow, do you have a line that starts with "nx:!:"? If so, try replacing "!" with "*".

----------

## WhimpyPeon

Thanks J-Kidd was just working on getting this running again after a fresh install and your tip did the trick!

----------

## opensas

Thanks a lot K-Kidd, that solved my problem too  :Wink: 

I guess the e-build should do that for you, or at least warn you about it

Saludos

Sas

----------

