Login into Ubuntu Using USB Flash Drive

Опубликовано: 23 Март 2026
на канале: Videoorchard
13,042
138

LET'S CONNECT ►   / videoorchard  


Step-by-Step to Setup USB flash Drive for Login into Ubuntu or Linux Mint


1. Open the terminal and run this command
sudo apt-get install pamusb-tools libpam-usb

2. Connect your usb flash drive to your computer/laptop

3. Add The Device name to PAMUSB
sudo pamusb-conf --add-device MYUSB

4. Add your Ubuntu username to PAM
sudo pamusb-conf --add-user username

5. Edit now this file to make sure PAM is using the pam_usb library
sudo gedit /etc/pam.d/common-auth (Ubuntu)
sudo pluma /etc/pam.d/common-auth (Linux Mint)

6. Paste The Following Command & Save it
auth sufficient pam_usb.so
auth [success=1 default=ignore] pam_unix.so nullok_secure try_first_pass

7. Try with following command,to test if it works
su username

Note:
If success you will get the message like this
pam_usb v0.5.0
Authentication request for user "coolanish5" (su)
Device "myusb" is connected (good).
Performing one time pad verification...
Regenerating new pads...
Access granted.


Videoorchard Official Fan pages:
Facebook :   / videoorchard  
Twitter :   / videoorchard  

Credits:
"After Dark" (Machinimasound.com ) & "Puncture" (LDUKMusic)
   / ldukmusic  
Licensed under Creative Commons "Attribution 3.0"
http://creativecommons.org/licenses/b...
https://machinimasound.com/license/