USB Restriction in Linux

36 views
Skip to first unread message

Manav Parekh

unread,
Sep 1, 2016, 7:21:44 AM9/1/16
to vg...@googlegroups.com
Hi All,

I want to restrict USB in linux OS. Please suggest me any successful tool or method.
Also user should not make change in this restriction. 

Any help will be appreciated.
-- 
Manav Parekh

Stay connected 

Twitter  Facebook  Google +  Linkedin

Sham Arsiwala

unread,
Sep 1, 2016, 7:27:14 AM9/1/16
to vg...@googlegroups.com
Hi,

Sham Arsiwala

On 01-Sep-2016, at 4:32 PM, Manav Parekh <mr.mana...@gmail.com> wrote:

Hi All,

I want to restrict USB in linux OS. Please suggest me any successful tool or method.
Also user should not make change in this restriction. 


Run lsmod command and check usb_storage module, 
Get information about the module with modinfo and module name,
And remove usb_storage module .ko file from syatem.

It will remove usb module and disable only usb storage module.

Thanks
Any help will be appreciated.
-- 
Manav Parekh

--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+un...@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG

---
You received this message because you are subscribed to the Google Groups "VGLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vglug+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nilesh Jain

unread,
Sep 1, 2016, 7:39:55 AM9/1/16
to vg...@googlegroups.com

insert the module by using insmod command.

insmod /lib/modules/$(uname -r)/kernel/drivers/usb/storage/
modprobe usb-storage.ko


--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+unsubscribe@googlegroups.com

To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG

---
You received this message because you are subscribed to the Google Groups "VGLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vglug+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Nilesh Jain

Manav Parekh

unread,
Sep 2, 2016, 12:52:20 AM9/2/16
to VGLUG
Let's think like user. If IT Department removes usb-storage.ko from my machine then how can I get this file back?

My requirement is simple. User should not install it back without permission of IT Dept.

Nirav Modiya

unread,
Sep 2, 2016, 3:32:31 AM9/2/16
to vg...@googlegroups.com
Simple. Dont give root access or sudo rights to user.
And change permission to 700 or modprob and insmod command.

--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+unsubscribe@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG

---
You received this message because you are subscribed to the Google Groups "VGLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vglug+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Nirav Modiya

BHARAT PRAKASH INANI

unread,
Sep 2, 2016, 3:33:13 AM9/2/16
to vglug
Dear Manav,

You can apply below mention settings:

Open /etc/modprobe.d/blacklist.conf and enter below mention line at EOF:

blacklist usb-storage

now save file.

Now open /etc/rc.local file and add below mention line above the last line of file:

modprobe -r usb_storage


May this will helpful for you.

Thanks and Regards,
Bharat Prakash Inani

On Thu, Sep 1, 2016 at 9:30 PM, Manav Parekh <mr.mana...@gmail.com> wrote:

--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+unsubscribe@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG

---
You received this message because you are subscribed to the Google Groups "VGLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vglug+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks and Regards,
Bharat Prakash Inani | System Administrator
QX KPO Services Pvt. LTD.
Contact - +91-9723643334



Reply all
Reply to author
Forward
0 new messages