add a user to an ubuntu system via launchpad ssh keys

glyph at divmod.com glyph at divmod.com
Thu Feb 7 08:01:46 GMT 2008


Quite often, I've discovered that I want to add someone to my system who 
already has an account on launchpad so they can log in and attach to my 
'screen' session; however, I will inevitably screw up typing in the 
finger information, setting permissions on their .ssh directory, 
assigning them a bogus password, etc.  Here's a simple Python script 
that will add a user to your system with the same username as on 
Launchpad, and their SSH keys already set up so they can log in, but no 
password.

Usage: sudo python launchpadduser.py glyph

You're expected to run this as root, so of course I am obligated to say 
that if you use this script you may die instantly from spontaneous 
combustion.  I've only even attempted to use it on Ubuntu 7.10 (gutsy), 
it will probably not work on anything else.

Enjoy!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: launchpadduser.py
Type: application/x-python
Size: 972 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/launchpad-users/attachments/20080207/ebf2d614/attachment.bin 


More information about the launchpad-users mailing list