Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] nxserver-freenx - user nx not allowed because account is locked
Date: Thu, 19 Mar 2009 18:07:37
Message-Id: 58965d8a0903191107j66da511au9c2c9755a9a2c7cc@mail.gmail.com
In Reply to: Re: [gentoo-user] nxserver-freenx - user nx not allowed because account is locked by Joseph
1 On Thu, Mar 19, 2009 at 11:38 AM, Joseph <syscon780@×××××.com> wrote:
2 > On 03/19/09 11:29, Paul Hartman wrote:
3 >>>>
4 >>>> it accepted the password, now do I run the setup again:
5 >>>> nxsetup --install --setup-nomachine-key --clean --purge
6 >>>>
7 >>>> If I try to login from another machine do I login as user "nx"?
8 >>>> When I try to login from another machine on my network I get:
9 >>>> Your guest account has expired...
10 >>>
11 >>> The way NX works is it uses the nx user as an intermediate. You need
12 >>> to login as a normal user, and you need to explicitly give that user
13 >>> permission to use NX by doing nxserver --useradd yourname (which will
14 >>> generate NX ssh keys and put them in that user's directory).
15 >>>
16 >>> If you use interactive/PAM authentication on your system, NX can use
17 >>> your user's normal system password; if you use key-based
18 >>> authentication for SSH the only way to make NX work is to use its
19 >>> internal password database and assing an NX-specific password to that
20 >>> user. In nxclient, copy the normal SSH key, and then in the nxclient
21 >>> login box put the NX username and password.
22 >>>
23 >>
24 >> I think the user DB setting is in /usr/NX/etc/server.cfg
25 >
26 > No there is no such file or directory on the server; that is why I'm asking
27 > if after setting the password for user "nx" I should run this command again:
28 > nxsetup --install --setup-nomachine-key --clean --purge
29 >
30 > as it is my impression that the setup was not complete.
31
32 Hmm. Okay, I am actually using nxserver-freeedition and not
33 nxserver-freenx. (I always get those confused).
34
35 On my machine I am the only user, so I don't know about multi-user
36 shared machines. I just want personal access to my home PC.
37
38 Here is my config that works for me with nxserver-freeedition with SSH
39 public key authentication:
40
41 In my sshd_config I've got:
42
43 PermitRootLogin No
44 RSAAuthentication no
45 PubkeyAuthentication yes
46 AuthorizedKeysFile .ssh/authorized_keys
47 PasswordAuthentication no
48 PermitEmptyPasswords no
49 ChallengeResponseAuthentication no
50 UsePAM no
51
52 Then in /usr/NX/etc/server.cfg I have:
53 EnableUserDB = "1"
54 EnablePasswordDB = "1"
55
56
57 then run "/usr//NX/bin/nxserver --useradd yourusername" which will add
58 that user to the NX user database as well as create/add an SSH key to
59 that user (which is only used by NX on the local machine, it will SSH
60 to itself). The password you create for this user is what you'll use
61 in nxclient when connecting to the remote machine, and the SSH key in
62 nxclient is the one that user would normally use to login to the box
63 with regular SSH.
64
65 If you don't use key authentication with SSH, you should be able to
66 have the two NX server options above set to 0, and use the user's
67 normal password to login. You will still need to put your NX server
68 key into nxclient (unless you use the default key which is already in
69 there).
70
71 It is tricky to set up, but once it works it is awesome. :) It beats
72 VNC or RDP easily.
73
74 Paul

Replies