Solved

FreeNX Server and Ubuntu 11.10

Posted on 2012-04-06
25
1,255 Views
Last Modified: 2012-07-14
I have just installed FreeNX on the Ubuntu box as per the instructions here:-

http://sites.google.com/site/barbarahohensee/desktop-virtualization-with-freenx, 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
ENABLE_PASSDB_AUTHENTICATION="1" in node.conf.

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?
0
Comment
Question by:cescentman
  • 15
  • 10
25 Comments
 
LVL 39

Expert Comment

by:noci
ID: 37819567
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.
0
 
LVL 1

Author Comment

by:cescentman
ID: 37819620
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?
0
 
LVL 1

Author Comment

by:cescentman
ID: 37835087
Can anyone help?
0
 
LVL 39

Expert Comment

by:noci
ID: 37837419
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.
0
 
LVL 1

Author Comment

by:cescentman
ID: 37840295
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.
0
 
LVL 39

Expert Comment

by:noci
ID: 37842613
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).
0
 
LVL 1

Author Comment

by:cescentman
ID: 37848867
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
0
 
LVL 39

Expert Comment

by:noci
ID: 37849154
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.. privatekey.pub )
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.
0
 
LVL 1

Author Comment

by:cescentman
ID: 37849158
Am I thick or what! Thanks I'll get back to you.
0
 
LVL 1

Author Comment

by:cescentman
ID: 37850128
Hmm

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
0
 
LVL 39

Expert Comment

by:noci
ID: 37850722
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.
0
 
LVL 1

Author Comment

by:cescentman
ID: 37850780
Thanks. It seems that Windows 7 has two separate folders:-

%userprofile%\\.nx
%userprofile%\.ssh

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

/var/lib/nxserver/home/default/keys

On the Ubuntu box running NXServer.

Is this correct?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 39

Expert Comment

by:noci
ID: 37851073
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 client.id_dsa.pub ].
0
 
LVL 1

Author Comment

by:cescentman
ID: 37851535
So on my windows box, the key in the config of the client needs to be the same as the key in:-

/var/lib/nxserver/home/.ssh/authorized_keys2
0
 
LVL 39

Expert Comment

by:noci
ID: 37851967
no..
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
/usr/nx/etc/server.cfg

And set:
SessionLogLevel = "7"

Reconnect and verify the logs again.
0
 
LVL 1

Author Comment

by:cescentman
ID: 37852119
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
0
 
LVL 1

Author Comment

by:cescentman
ID: 37874346
Any thoughts?
0
 
LVL 39

Expert Comment

by:noci
ID: 37874421
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 ].
0
 
LVL 1

Author Comment

by:cescentman
ID: 37874496
When I do a search across the whole file system from / there appears to be no "server.cfg".
0
 
LVL 39

Expert Comment

by:noci
ID: 37874685
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.
0
 
LVL 1

Author Comment

by:cescentman
ID: 37875859
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
0
 
LVL 1

Author Comment

by:cescentman
ID: 37906715
Did this mean anything to you?
0
 
LVL 39

Accepted Solution

by:
noci earned 500 total points
ID: 37906763
( 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.
0
 
LVL 1

Author Comment

by:cescentman
ID: 37906801
Maybe I have installed the wrong version then. I though I had installed the free version. Will have to look into this.
0
 
LVL 1

Author Closing Comment

by:cescentman
ID: 38186672
It's taken me a while to get back to this but it's sorted now. Thanks for the help.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Creating a Samba server for a small office. Ubuntu Linux and Samba can breathe new life into a retired PC and save an office money on new hardware/software. Our example server will have two hard disks, one exclusively for storing shared data. …
Users are often faced with high disk consumption without really knowing where the largest amount of data resides. Disk Usage Analyzer (aka Baobab) is is a graphical, menu-driven application to analyse disk usage in any Gnome environment and can e…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now