0

I followed the directions located here http://linuxconfig.org/linux-authentication-login-with-usb-device

Once I reached step 4 I found that the changed authorizations did nothing, so I reverted back, saved over it so I whent back to the end of step 3 and looked up other tutorials and found a video.... the video, which made a successful attempt, did not make any changes to the file. So, I tried login in with making no changes to the authorizations, no joy.

When I see them do su "username" they get this 5 line, 6 line explenation from terminal about their login status. I get a single line that says "no passwd entry for user 'Thornton'"

I dont know what I am doing wrong at this point. As stated in the title I am using the latest version of ubuntu and would like not to leave this half finished.

It still asks me for my writen password and my writen password still works.

Everything in the pictures proveded match up with my results up until this point, so they are not a good reference for understanding where the problem is.

1 Answer 1

0

I am using this on 14.04 and it is working. Some things I have noticed:
Only one usb device per username. Otherwise the error "no device found for user 'username'"

I did not change the /etc/pam.d/common-auth file at all. "ie auth sufficient".

Use $ pam-auth-update instead, unless you are adding events to detect when the usb device is plugged in or disconnected. Be warned, the $ pam-auth-update command will not work after you manually change the /etc/pam.d/common-auth file. You will need to manually manage it. pam-auth-update will force reverting to the default file if run in the future.

Use the following command after plugging in the desired usb device. Change "MyDevice" to any one word you want. like MyDevice, Lexar32gb, Sandisk, etc.

$ sudo pamusb-conf --add-device MyDevice
Please select the device you wish to add.
* Using "Verbatim STORE N GO (Verbatim_STORE_N_GO_07A10D0894492625-0:0)" (only option)

Which volume would you like to use for storing data ?
0) /dev/sdb2 (UUID: A842-0654)
1) /dev/sdb1 (UUID: CAAF-0882)

[0-1]: 0

Name            : MyDevice
Vendor          : Verbatim
Model           : STORE N GO
Serial          : Verbatim_STORE_N_GO_07A10D0894492625-0:0
UUID            : A842-0654

Save to /etc/pamusb.conf ?
[Y/n] Y
Done.

Use this command to add the user account you want linked to the device.

$ sudo pamusb-conf --add-user username
Which device would you like to use for authentication ?
* Using "MyDevice" (only option)

User            : username
Device          : MyDevice

Save to /etc/pamusb.conf ?
[Y/n] y
Done.

After this, Test the functionality by: This is a successfull test.

$ su username
* pam_usb v0.5.0
* Authentication request for user "username" (su)
* Device "-MyDevice" is connected (good).
* Performing one time pad verification...
* Access granted.

This is a fail.

* pam_usb v0.5.0
* Authentication request for user "username" (su)
* Device "-MyDevice" is not connected.
* Access denied.
Password: 

If you get:

* pam_usb v0.5.0
* Authentication request for user "uername" (su)
* Device "-MyDevice" is connected (good).
* Performing one time pad verification...
* pad verification failed (i think this is the error line)
* Access denied.
Password: 

Perform a

$ rm ~/.pamusb/*

This will erase the pad file, and running the

$ su username

will force a recreation of the pad file with the correct group and file permissions.

Let me know if this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .