Spread the love

In the company where I work, the employees often had to work from their homes during the pandemic. This necessitated the need to encrypt these laptops, and then to the question of how to stop all USB ports and CDs. In this article, we will look at some simple but effective methods to disable USB ports, CD drives and floppies.

But in the end, why do we need all this?
Well, often people, without even realizing it, can forget their laptop unlocked in a cafe and a conscientious person can quickly download a few key files or do a bunch of other nonsense. Therefore, in some cases, locking all communication ports on the laptop would increase your corporate security.

So what to do for usb ports. There is a very simple command that will help us in this case.

sudo echo "blacklist usb-storage" >> /etc/modprobe.d/blacklist.conf
Code language: Bash (bash)

Now for the CD-ROM just a reminder for all of this commands you have to be as root..

eject -i 1
chmod 000 /cdrom
chmod 000 /media

It’s a simple solution but it works perfectly.

And for the floppy drive

chmod 000 /dev/fd0

In conclusion, we could say that the time consuming for this whole operation is no more than two minutes and the headache that we could save from possible theft of information is staggering.

Leave a Reply