Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB Authentication with pam_usbng
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
snake111
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2004
Posts: 124

PostPosted: Wed Nov 26, 2008 12:01 pm    Post subject: USB Authentication with pam_usbng Reply with quote

Hi all, I did an ebuild for pam_usbng ( http://usbauth.delta-xi.net/ ) it's the project following usbauth which is deprecated.
I did a svn checkout on 25 Nov 08, because there's no tar package with sources available. From the official site, seems that it's the 0.2 version, but it's mainly a version number guess...

Anyway, installed successful for me, just a bit of extra work setting authentication with non-USB devices, like my MMC used with the integrated reader of my laptop. I had to prepare the partition scheme using the MMC with a USB reader, then setup the config files using:

Code:
dev=/dev/mmcblk0p2


instead of

Code:
usbid=USB_SERIAL#PARTITION_NUMBER

ex: usbid=04030603025#2


where for my MMC /dev/mmcblk0 is the device and p2 is the partition 2 and p1 is the partition 1 of course.

and finally when using uadevwrite had to launch

Code:
uadevwrite /path/to/pamauth-ng.conf /dev/mmcblk0p2


instead of

Code:
uadevwrite /path/to/pamauth-ng.conf USB_SERIAL



heres the ebuld for sys-auth/pam_usbng the SRC_URI isn't working of course, simply checkout from svn as explained on the official site and create a pam_usbng-0.2.tar.bz2 archive with the source tree to put in /usr/portage/distfiles/ and you're done.

Code:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils pam

DESCRIPTION="pam_usbng provides passwordless local user authentication via o\
rdinary USB storage devices."
HOMEPAGE="http://usbauth.delta-xi.net"
SRC_URI=http://dl.delta-xi.net/${P}.tar.bz2

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND="dev-libs/openssl
sys-libs/pam
sys-apps/parted"
RDEPEND=""

src_compile() {
emake -j1 DESTDIR=${D} || die "emake failed"
}

src_install() {
emake -j1 DESTDIR=${D} install || die " emake install failed"
}


Let me know if works, if have questions, or suggestions, anyway you can follow the official doc for distribution-independent configuration stuff.
Have fun!


Last edited by snake111 on Thu Nov 27, 2008 12:36 am; edited 1 time in total
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Wed Nov 26, 2008 2:38 pm    Post subject: Reply with quote

Why not save some hassle and write an svn-capable ebuild?
More info at http://devmanual.gentoo.org/ebuild-writing/functions/src_unpack/svn-sources/index.html
Back to top
View user's profile Send private message
snake111
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2004
Posts: 124

PostPosted: Wed Nov 26, 2008 4:07 pm    Post subject: Reply with quote

That's even better! I didn't know it was possible... :oops: :oops:
I will modify the ebuild as soon as I have little of time :) thx for the advice ;)
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Wed Nov 26, 2008 4:16 pm    Post subject: Reply with quote

Quote:
thx for the advice
Thanks for the ebuild :)
If it's finished and working, please consider posting it at bugs.gentoo.org

Edit, ups, just read that it's cvs not svn, than of course, you should follow the following link, if you haven't found it yourself, yet.
http://devmanual.gentoo.org/ebuild-writing/functions/src_unpack/cvs-sources/index.html
Back to top
View user's profile Send private message
snake111
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2004
Posts: 124

PostPosted: Thu Nov 27, 2008 12:39 am    Post subject: Reply with quote

ph030 wrote:
Quote:
thx for the advice
Thanks for the ebuild :)
If it's finished and working, please consider posting it at bugs.gentoo.org

Edit, ups, just read that it's cvs not svn, than of course, you should follow the following link, if you haven't found it yourself, yet.
http://devmanual.gentoo.org/ebuild-writing/functions/src_unpack/cvs-sources/index.html


ok I'll do it. You were right, the official site reports svn, I don't know why I wrote cvs in my first post... :oops: :cry: anyway I've edited the post and it's ok now, thanks ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum