<br><tt><font size=2>freenx-knx-bounces@kde.org wrote on 09/05/2012 13:24:18:<br>
</font></tt>
<br>
<br><tt><font size=2>Still not got all of it.</font></tt>
<br>
<br><tt><font size=2> <br>
> To replace just the PASSDB "ssh to localhost key" <br>
> if it gets compromised :- <br>
> <br>
> as user nx <br>
> export $(grep ^NX_ETC_DIR /usr/bin/nxloadconfig) <br>
> <br>
> /usr/bin/ssh-keygen -f $NX_ETC_DIR/users.id_dsa -t dsa -N ""
<br>
> chown nx:root $NX_ETC_DIR/users.id_dsa $NX_ETC_DIR/local.id_dsa.pub
<br>
> <br>
> This will save you having to update all your nxclients. <br>
</font></tt>
<br>
<br><tt><font size=2>OK, that replaces the PASSDB keys</font></tt>
<br>
<br><tt><font size=2>but to actually change the PASSDB keys in use</font></tt>
<br>
<br><tt><font size=2>you then have to run</font></tt>
<br>
<br><tt><font size=2> nxserver --adduser</font></tt>
<br>
<br><tt><font size=2>again on ALL your PASSDB users because</font></tt>
<br>
<br><tt><font size=2>adduser ADDS the</font></tt>
<br>
<br><tt><font size=2> local.id_dsa.pub</font></tt>
<br>
<br><tt><font size=2>key to all the user's</font></tt>
<br>
<br><tt><font size=2> ~/.ssh/authorized_keys2</font></tt>
<br>
<br><tt><font size=2>files.</font></tt>
<br>
<br>
<br>
<br>
<br><tt><font size=2>passdb_add_user()</font></tt>
<br><tt><font size=2>{</font></tt>
<br><tt><font size=2> [SNIP]</font></tt>
<br><tt><font size=2> su - $PASSDB_CHUSER -c
"$PATH_BIN/nxnode --setkey"</font></tt>
<br>
<br><tt><font size=2> --setkey)</font></tt>
<br><tt><font size=2>
[SNIP]</font></tt>
<br><tt><font size=2> cat
$NX_ETC_DIR/users.id_dsa.pub >> $HOME/.ssh/$SSH_AUTHORIZED_KEYS</font></tt>
<br>
<br><tt><font size=2>HOME being the user's home diresctory</font></tt>
<br>
<br>
<br>
<br><tt><font size=2>BUT</font></tt>
<br>
<br><tt><font size=2>there is no automated way of removing them</font></tt>
<br><tt><font size=2>so</font></tt>
<br><tt><font size=2>if you think you have a compromised</font></tt>
<br>
<br><tt><font size=2> $NX_ETC_DIR/users.id_dsa</font></tt>
<br>
<br><tt><font size=2>file,</font></tt>
<br><tt><font size=2>which will</font></tt>
<br><tt><font size=2>allow an intruder to "ssh -i keyfile" in
to your server</font></tt>
<br><tt><font size=2>as</font></tt>
<br><tt><font size=2>any user set up for PASSD with local.id_dsa.pub in
their</font></tt>
<br>
<br><tt><font size=2> ~/.ssh/authorized_keys2</font></tt>
<br>
<br><tt><font size=2>you then have to remove the old key manually from
all</font></tt>
<br><tt><font size=2>their authorized_keys2 files.</font></tt>
<br>
<br><tt><font size=2>None of this messy stuff appears in the documentation.</font></tt>
<br>
<br>
<br>
<br><tt><font size=2>I don't like the sound of PASSDB at all</font></tt>
<br><tt><font size=2>and</font></tt>
<br><tt><font size=2>the fact that centos (no nxsetup) won't overwrite
the</font></tt>
<br><tt><font size=2>user nx key files without them being deleted sounds</font></tt>
<br><tt><font size=2>a bit of an issue too . . .</font></tt>
<br>
<br><tt><font size=2>I wonder how many people have re-installed thinking</font></tt>
<br><tt><font size=2>that they then have a nice new setup . . .</font></tt>
<br>
<br><tt><font size=2>nxsetup --install just overwrites the nx user key
files</font></tt>
<br><tt><font size=2>but</font></tt>
<br><tt><font size=2>even that won't replace users.id_dsa without a --purge</font></tt>
<br>
<br><tt><font size=2>I think I'll stick with ssh + ssh password</font></tt>
<br>
<br>
<br>