FreeNX Server and Ubuntu 11.10

I have just installed FreeNX on the Ubuntu box as per the instructions here:-, changing the binaries for the i386 versions and there were no errors.

When I try to connect form my Windows 7 box using th NX Client I get an error:-

Authentication failed for user xxxxxxxx

I guessed it was permissions so on the Ubuntu box I tried:-

sudo nxserver --useradd xxxxxxxx

I got the response:-

NX> 100 NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
NX> 500 Error: The passdb function is not activated in node.conf.

Most probably your FreeNX setup will work out of the box without this
functionality and you've been misleaded by an old tutorial or old
documentation to do this step.

If however you really need this functionality, just set

Open in new window

I haven't tried making the changes as I'm now out of my comfort zone and unsure whether this is the problem or not. Can anyone help?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nociSoftware EngineerCommented:
Do you also have a matching set op SSH keys setup for nx?

Where the public key is on the nxserver system and the private key is in every client?

ssh-keygen can be used to generate such a pair.
cescentmanAuthor Commented:
Thanks for the reply. When I installed NXServer I chose the option to use the preloaded nx ones. Do I need to do something else?
cescentmanAuthor Commented:
Can anyone help?
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

nociSoftware EngineerCommented:
Is the user account known on your host system?
Can you show the details from a login?

I would consider it a security risk to just allow anybody access through the default keys, so I always generated my own.
cescentmanAuthor Commented:
if you mean the ubuntu box, yes there is only the one user account.
You will have to more specific I'm afraid, show details?
This only on my private LAN and it's a trial so I'm not worried about security at this point in time.
nociSoftware EngineerCommented:
If you connect the details of why a connection failed are "hidden" and only shown when you push a "details" button.

I meant that because I didn;t go for defaults i have no experience with out of the box work, just with a generated keypair.
Anyway the keypair is available on the server, you can lift the private key from there and paste it in your connection profile.
(and see if they are equal too BTW).
cescentmanAuthor Commented:
The details button is greyed out on my client box:

NX client windows
I can see no way of configuring keypair settings in a connection profile where do I look for that?:-

Main windowConfigure: GeneralConfigure: AdvancedConfigure: ServicesConfigure: EnvironmentConfigure: About
nociSoftware EngineerCommented:
It is behind the Key button in the 3rd screenshot. [ General Tab ].

There you need the private key part of the keypair on the server.

(if you use ssh-keygen you get a privatekey.. )
On the server you have an ~nx/.ssh/authorize_keys2
Containing all public keys, the private key needs to be pasted into the nx config...
~nx is short for the home directory from the nx user.
cescentmanAuthor Commented:
Am I thick or what! Thanks I'll get back to you.
cescentmanAuthor Commented:

On the server there doesn't seem to be a folder .ssh and the .nx folder is empty:-

NX Server: Home folderNX Server: My Home Folder
nociSoftware EngineerCommented:
On your workstation in then ~/.nx folder [ /home/user/.nx ] the connection profiles are stored. [ if you hit the save button on the nxclient software ]/

To verify nx setup on the system where the nxserver runs do:
   ssh into your server  
   sudo -s   # if not logged on as root ]
   cd ~nx/.ssh
   ls -la

Alternatively use:
   ssh into your server
   sudo -u nx -s
   ls -la # should show a .ssh directory
   cd .ssh
   ls -la # should show the same as the last command in the previous set.

It should not be empty as at least the default public key should be stored there.
cescentmanAuthor Commented:
Thanks. It seems that Windows 7 has two separate folders:-


The key on the windows client is the same as the key in "client.id_dsa.key" in:-


On the Ubuntu box running NXServer.

Is this correct?
nociSoftware EngineerCommented:
Yes, client.id_dsa is the private key,  that needs to be distributed to all nxclient.

The public key should be in  /var/lib/nxserver/home/.ssh/authorized_keys2
[ derived from ].
cescentmanAuthor Commented:
So on my windows box, the key in the config of the client needs to be the same as the key in:-

nociSoftware EngineerCommented:
The key consists of an assymmetric key pair: the public part is different from the private part, but they can only be used together.
The public key part of the key is in the authorized_keys2 file, the private part should be in the nxclient profile.
If the private part of the default key is in the client.id_dsa.key file on your server.

After the session state is final the Details button should become "un-greyed".
IF it just dissappears you may need to examine the logs on the server:

grep -i nx /var/log/*

And see if something about some obvious mistakes are mentioned.
If no sufficient info can be found, you can turn on "debug" logging by updating the

And set:
SessionLogLevel = "7"

Reconnect and verify the logs again.
cescentmanAuthor Commented:
Details button remains greyed out after the the authorisation failure:-

Link to screen shot above

grep -i nx /var/log/*

does not return any results that relate to NXServer. Just results from "/var/log/udev" and "/var/log/Xorg.0.log.old" for "LNXSYSTM:"

"/usr/nx/etc/" does not exist on my Ubuntu box and doing a search for "server.cfg" returns nothing
cescentmanAuthor Commented:
Any thoughts?
nociSoftware EngineerCommented:
I am not sure where your server.cfg file  for nx is.
That's the one you need to edit for getting more info.

It might be  in /var/lib/nxserver/...?
or in /etc/nx...?

My setup on Gentoo is in /usr/NX/... [ with the whole original nx shebang in there ].
cescentmanAuthor Commented:
When I do a search across the whole file system from / there appears to be no "server.cfg".
nociSoftware EngineerCommented:
Well the nxserver does need a config file to startup...

If find doesn't yield anything, try to run the nxserver --update command.
That should at least show where the server.cfg is.
cescentmanAuthor Commented:
I get:-

NX> 100 NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
NX> 500 Error: Function --update not implemented yet.
NX> 999 Bye
cescentmanAuthor Commented:
Did this mean anything to you?
nociSoftware EngineerCommented:
( I have nxserver freeedition )

$ /usr/NX/bin/nxserver --version
NXSERVER - Version 3.5.0-5

Appearantly different.
The bottom line is you need to find where the config file is for NXserver and you have to enable debug mode to get better logging. [ i think ]
--update show the location of the config file on my ssytem.

3.2.0 might be a bit old esp. if parts of 3.5.0 are used. On my system all parts are of 3.5.0.x
where the x varies.
So it might be a version problem internaly, some debug logging most probably will tell this.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cescentmanAuthor Commented:
Maybe I have installed the wrong version then. I though I had installed the free version. Will have to look into this.
cescentmanAuthor Commented:
It's taken me a while to get back to this but it's sorted now. Thanks for the help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.