What the trick does is letting us login to Ubuntu without entering the password as long as the USB flash drive is connected to the computer. OK! Let's get started.
Please make sure that the USB flash drive is connected to the computer and install the required packages:
- sudo apt-get install pamusb-tools libpam-usb
Run the following command to indentify the USB flash drive:
You can replace "ubuntubuzz-usb" with anything you want. You'll be asked to save the identity of the USB flash drive, press "Y" and then Enter.
- sudo pamusb-conf --add-device ubuntubuzz-usb
The next step to do is adding login username to the USB flash drive, simply run the following command:
Please replace "hok00age" with your desired username to login. You'll be asked to save your changes, press "Y" and then Enter.
- sudo pamusb-conf --add-user hok00age
Checking configuration
For the sake of our effort, before trying this out, please check file "/etc/pam.d/common-auth" and make sure that the red boxed text is exist and not commented. (see the picture below)
The last check point to do is running the following command:
Replace "hok00age" with your username you've added before. If everything goes well, you'll get these output:
- pamusb-check hok00age
You're done! Now you can login to Ubuntu without entering password as long as the USB flash driver connected to the computer.
Regards :)
0 comments:
Post a Comment