pam_sshauth in getting somewhat "usable". Hack session?

Scott Balneaves <sbalneav-TFIdw2FCnGjMR/[email protected]> Fri, 19 Nov 2010 13:10:27 -0600
Newsgroups gmane.linux.terminal-server.devel
Organization Legal Aid Manitoba
Message-ID <[email protected]>
Hello, all:

So, after a month of dedicated hacking, libpam_sshauth is now in an interesting
state:

https://code.launchpad.net/~sbalneav/ltsp/libpam-sshauth

to use it:

After compiling, and installing, you'll need to set up a /etc/pam.d/flarp
file (where "flarp" is the name of the service you want to authenticate
against).

Mine looks like this:

#%PAM-1.0
auth    required        pam_sshauth.so debug
session optional        pam_sshauth.so debug

then, just set an environment variable:

export PAM_SSHAUTH_HOST=host.to.authenticate.against

and run:

./pamtest flarp userid

it should:

Ask for a password, authenticate, and then (as part of the session) launch an
ssh tunnel.  It will export an environment variable PAM_SSHAUTH_SOCKET that
points to the socket file (currently hard-coded to be created in /tmp.  We'll
fix this "later").

So... *IN THEORY*:

if we:

1) pick a DM like gdm, or slim, or whatever,
2) Modify it's /etc/pam.d/*dm file to point to pam_sshauth.so
3) munge some of the startup files for the dm to set the proper environment
variables, and
4) after a login, make sure we set LDM_SOCKET=${PAM_SSHAUTH_SOCKET}, and call
the ldm init scripts.

Boom.  We should be "logged in" with a regular display manager.

The second part to this will be getting a working libnss_sshauth module, that
will look up passwd, group, and possibly host information over the established
${PAM_SSHAUTH_SOCKET}.

If we can get 2 or 3 of us together, maybe this weekend for a mini "hackfest"
to get a proof of concept going, I think we'd be in good shape.

Any takers?

Cheers,
Scott

-- 
Scott L. Balneaves | I have nothing definite to apologize for,
Systems Department | I'm just sorry about everything in general.
Legal Aid Manitoba |     -- Ashleigh Brilliant

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_____________________________________________________________________
Ltsp-developer mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-developer
For additional LTSP help,   try #ltsp channel on irc.freenode.net