Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pam_usb problem using usb-storage
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
mOoh
n00b
n00b


Joined: 20 Jun 2003
Posts: 39
Location: paris

PostPosted: Tue Sep 21, 2004 1:12 pm    Post subject: pam_usb problem using usb-storage Reply with quote

hi, i'm trying to use an usb key to auth myself on my gentoo box

after emerging pam_usb, i run:
Code:

tek root # mount /mnt/usbkey/
tek root # usbadm keygen /mnt/usbkey/ fk 2048
[!] Generating 2048 DSA key pair for fk@tek
[!] Extracting private key...
[+] Private key extracted.
[+] Private key successfully written.
[!] Writing public key...
[+] Public key successfully written.
tek root # usbadm cipher /mnt/usbkey/ fk 3des
[!] Importing the private key...
[+] Private key imported
[-] Invalid algorithm "3des".
[+] Private key successfully written using cipher 3des


(with "/dev/sda1 /mnt/usbkey auto noauto,noexec 0 0" in fstab)

in /etc/pam.d/login, i've add:
Code:

auth       sufficient   /lib/security/pam_usb.so fsext2 debug=1 force_device=/dev/sda1 fs=ext2 check_if_mounted=1 debug=1


but when i try to login:
Code:

tek login: fk
[pam.c:118] Authentication request from local console (/dev/vc/2)
[device.c:71] Directory /proc/scsi/usb-storage-0/ not found
[pam.c:194] Device not valid.
Password:


i've no /proc/scsi/usb-storage-0 but /proc/scsi/usb-storage/0

Code:

tek root # cat /proc/scsi/
device_info  scsi         usb-storage 
tek root # cat /proc/scsi/usb-storage/0
   Host scsi0: usb-storage
       Vendor: Netac
      Product: OnlyDisk
Serial Number: None
     Protocol: Transparent SCSI
    Transport: Bulk
       Quirks:
tek root #




but i don't know how to change this..
(the usbkey works well with /dev/sda1 for other applications)
anyone got an idea ?

thx.
_________________
pom.
Back to top
View user's profile Send private message
mOoh
n00b
n00b


Joined: 20 Jun 2003
Posts: 39
Location: paris

PostPosted: Thu Sep 23, 2004 7:21 am    Post subject: Reply with quote

path is hardcoded in pam_usb

Code:

src/conf.c:26:  {"proc_basename",   CHAR, (char*)"/proc/scsi/usb-storage-%d/",  &usb_conf.proc_basename},


:\

i will try to recompil modified sources
_________________
pom.
Back to top
View user's profile Send private message
mOoh
n00b
n00b


Joined: 20 Jun 2003
Posts: 39
Location: paris

PostPosted: Fri Sep 24, 2004 3:05 pm    Post subject: Reply with quote

i've try with:

Code:

        {"proc_basename",   CHAR, (char*)"/proc/scsi/usb-storage/%d",   &usb_conf.proc_basename},


after recompil/install/reboot, it doesn't work more:

Code:

tek login: fk
[pam.c:118] Authentication request from local console (/dev/vc/2)
[pam.c:194] Device not valid.
Password:


and nothing in logs
Code:

Sep 24 17:04:49 tek login(pam_unix)[6483]: session opened for user fk by (uid=0)
Sep 24 17:04:51 tek login(pam_unix)[6483]: session closed for user fk


:/
_________________
pom.
Back to top
View user's profile Send private message
mOoh
n00b
n00b


Joined: 20 Jun 2003
Posts: 39
Location: paris

PostPosted: Sun Sep 26, 2004 3:56 pm    Post subject: Reply with quote

nobody uses pam_usb?
_________________
pom.
Back to top
View user's profile Send private message
La`res
Arch/Herd Tester
Arch/Herd Tester


Joined: 11 Aug 2003
Posts: 79
Location: ::0

PostPosted: Fri Dec 17, 2004 9:05 pm    Post subject: Reply with quote

Quote:
Code:
auth       sufficient   /lib/security/pam_usb.so fsext2 debug=1 force_device=/dev/sda1 fs=ext2 check_if_mounted=1 debug=1


YOu have 'fsext2' AND 'fs=ext2' Could that be the problem?
_________________
Lares Moreau <lares.moreau@gmail.com>
LRU: 400755 http://counter.li.org
lares/irc.freenode.net
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