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 15:54:01
Message-Id: 58965d8a0903190853v74817ffdk445de8185f0f037b@mail.gmail.com
In Reply to: Re: [gentoo-user] nxserver-freenx - user nx not allowed because account is locked by Paul Hartman
1 On Thu, Mar 19, 2009 at 10:51 AM, Paul Hartman
2 <paul.hartman+gentoo@×××××.com> wrote:
3 > On Thu, Mar 19, 2009 at 10:44 AM, Joseph <syscon780@×××××.com> wrote:
4 >> On 03/19/09 10:03, Paul Hartman wrote:
5 >> [snip]
6 >>>>
7 >>>> log/messages prints:
8 >>>> user nx not allowed because account is locked
9 >>>>
10 >>>> How to unlock the account?
11 >>>
12 >>> passwd -u nx
13 >>>
14 >>> I had to do the same thing.
15 >>>
16 >>> Paul
17 >>
18 >>
19 >> Yes, I tried it already:
20 >>
21 >> passwd -u nx
22 >> passwd: unlocking the user would result in a passwordless account.
23 >> You should set password with usermod -p to unlock this user account.
24 >> Password changed.
25 >>
26 >> What do you do next?
27 >>
28 >> When I try to run again:
29 >> nxsetup --install --setup-nomachine-key --clean --purge
30 >>
31 >> I get:
32 >> ...
33 >> Setting up /var/log/nxserver.log ...done
34 >> Setting up special user "nx" ...passwd: unlocking the user would result in a
35 >> passwordless account.
36 >> You should set a password with usermod -p to unlock this user account.
37 >> Password changed.
38 >> done.
39 >> ...
40 >> ----> Testing your nxserver connection ...
41 >> Permission denied (publickey,keyboard-interactive).
42 >> Fatal error: Could not connect to NX Server.
43 >>
44 >> Please check your ssh setup:
45 >>
46 >> The following are _examples_ of what you might need to check.
47 >>
48 >> - Make sure "nx" is one of the AllowUsers in sshd_config.
49 >> (or that the line is outcommented/not there)
50 >> - Make sure "nx" is one of the AllowGroups in sshd_config.
51 >> (or that the line is outcommented/not there)
52 >> - Make sure your sshd allows public key authentication.
53 >> - Make sure your sshd is really running on port 22.
54 >> - Make sure your sshd_config AuthorizedKeysFile in sshd_config is set
55 >> to authorized_keys2.
56 >> (this should be a filename not a pathname+filename)
57 >> - Make sure you allow ssh on localhost, this could come from some
58 >> restriction of:
59 >> -the tcp wrapper. Then add in /etc/hosts.allow: ALL:localhost
60 >> -the iptables. add to it:
61 >> $ iptables -A INPUT -i lo -j ACCEPT
62 >> $ iptables -A OUTPUT -o lo -j ACCEPT
63 >>
64 >>
65 >> So at this point I'm back to square one in log/messages I get:
66 >> User nx not allowed because account is locked
67 >
68 > Oh, try to give user nx a password on your system. It uses ssh keys
69 > to login, so it doesn't even matter what the password is. Just don't
70 > make it something easily guessed/brute-force like "nx" or "1234" or
71 > else you might have some unwanted guests in your system :)
72 >
73
74 Now that I think of it, you might even be able to assign a password,
75 unlock, and then delete the password with "passwd -d nx".