[Server-devel] public keys not getting written to authorized_keys file during registration

Martin Langhoff martin.langhoff at gmail.com
Tue Sep 15 06:21:09 EDT 2009


On Mon, Sep 14, 2009 at 3:59 PM, Hamilton Chua <hamilton.chua at gmail.com> wrote:
> I'm not sure if anybody has experienced this yet. Using XS version
> 0.6d5, when I register a user the public key doesn't get written to the
> authorized_keys file for the new user.

Thanks for the bug report and the diagnosis! I've pushed out a patch
(cc'd to you and the list) and a new rpm at

   idmgr-0.7.16.gaf830ef-1.xs9.noarch.rpm

cc'ing dsd as his installs probably are having the same prob.

The update doesn't have anything to fix the missing ssh keys. You do
have them in the sqlite3 db, so you can probably fix it with a bit of
shell along the lines of

sqlite3 -column /home/idmgr/identity.db 'SELECT serial, pubkey from
laptops' > /tmp/snpubkeys
for line in `cat /tmp/snpubkeys`; do
   sn=`echo $line | cut -f1`
   pk=`echo $line | cut -f2`
   echo "ssh-dss $pk" > /library/users/$sn/.ssh/authorized_keys
   chown $sn.sn /library/users/$sn/.ssh/authorized_keys
done

(untested!, if you do get to polish a working one, do post it!)



m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the Server-devel mailing list