# Use the Host's USB device in a Container ###### tags: `Container` `Podman` Smart Card reader for example ## The information of the Smart Card ```shell= $ lsusb | grep Alcor Bus 001 Device 008: ID 058f:9520 Alcor Micro Corp. Watchdata W 1981 ``` The device **008** is on bus **001**. ``` $ ls -l /dev/bus/usb/001/008 crw-rw-r--+ 1 root root 189, 7 Feb 3 12:15 /dev/bus/usb/001/008 ``` ## Prepare the container Run a container, podman with the stable Debian for example: ```shell= $ podman run -it --rm --device=/dev/bus/usb/001/008 docker.io/library/debian:stable-slim bash root@91aa8a2257ff:/# ls -l /dev/bus/usb/001/008 crw-rw-r--+ 1 nobody nogroup 189, 7 Feb 3 04:15 /dev/bus/usb/001/008 root@91aa8a2257ff:/# apt update -y && apt install libccid pcscd pcsc-tools -y Get:1 http://deb.debian.org/debian stable InRelease [116 kB] ... ``` Start the pcscd and scan the smart card reader: ```shell= root@91aa8a2257ff:/# pcscd & [1] 2447 root@91aa8a2257ff:/# pcsc_scan Using reader plug'n play mechanism Scanning present readers... 0: Alcor Micro AU9520 00 00 Thu Feb 3 04:15:36 2022 Reader 0: Alcor Micro AU9520 00 00 Event number: 0 Card state: Card removed, \ ``` Now, we can see it found the **Alcor Micro AU9520** USB smart card reader ## Reference * [Using files and devices in Podman rootless containers](https://www.redhat.com/sysadmin/files-devices-podman)