Re: how to enable /disable USB ports



pawanbhardwaj staggered into the Black Sun and said:
sir,

There are a number of ma'ams who read this froup.

I have got a software project: to develop a [program] which is able to
enable/disable [the] USB ports of a single computer

All ports, or individual ports? Disabling all USB ports is relatively
easy, just rmmod ehci_hcd, uhci_hcd, and ohci_hcd. Disabling individual
USB ports while leaving other ports active is AFAICT not supported right
now in a transparent way as it's pretty useless. I suppose if you
called hub_port_disable() from a kernel module with appropriate args,
you could disable a port. This could have unintended consequences,
though.

and afterwards in LAN environment.

....huh? If you meant that you want machine A to be able to tell machine
B "turn off {all,some} USB ports" and have machine B actually do that,
that'd require custom code on both machines. It'd also annoy the users
of machine B and be a potential security risk, as the process on machine
B would probably have to run as root. Unless it did "sudo rmmod
ehci_hcd ..." etcetera.

plz guide me how i should start as I am new to Linux.

This is a bad project to start on if you're a complete n00b, unless you
need to disable all USB ports.

--
Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect.
--Linus Torvalds
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.



Relevant Pages

  • Re: Firefox browser - more info
    ... There is no possible reason for you to do this. ... Aside from disabling ... the usb ports, there is no way you can stop this behavior. ... using Firefox will void your warranty and cause your cat to ...
    (microsoft.public.windowsxp.general)
  • Re: AAA**BSODwhen playing games**AAA
    ... As I said in the e-mail with the attached mini-dump. ... the USB ports in my BIOS and haven't had a stop error since about noon ... >you stated that you were going to try disabling the USB ports, ...
    (microsoft.public.windowsxp.general)
  • Re: Firefox browser - more info
    ... WWII wrote: ... There is no possible reason for you to do this. ... Aside from disabling ... the usb ports, there is no way you can stop this behavior. ...
    (microsoft.public.windowsxp.general)
  • USB Mass Storage driver
    ... HP's software changed something to do with the USB Mass ... What's more is that my other USB ports seem to be ... wondering if the disabling of the USB Mass Storage driver will keep it ...
    (microsoft.public.windowsxp.general)
  • USB Devices
    ... We are looking for a way to secure the USB ports on PC's within our ... network without disabling them. ...
    (comp.security.misc)