0

I need to disable CD/DVD ROM and USB ports for desktop on which 14.04 Ubuntu is installed.Tried updating in modprobe.conf but no luck.Please tell me if any other alternativies.

2
  1. edit this file blacklist.conf :

    from Terminal :

    sudo nano /etc/modprobe.d/blacklist.conf
    

    from GUI:

    press Alt+F2 then use the command

    gksu gedit /etc/modprobe.d/blacklist.conf
    
  2. Add now the following two lines:

    # Block access to USB  
    blacklist usb_storage
    
  3. Save the file and close it, then restart your system. Your USB ports are now disabled.

  4. To enable USB ports, repeat the same steps and in step2, comment the "blacklist usb_storage" line as follows:

    # blacklist usb_storage
    
  • Forget the gedit part. That's not necessary. – A.B. May 5 '15 at 14:01
  • @A.B. what do you mean ? – Fat Mind May 5 '15 at 14:02
  • There is no need to use a graphical text editor in a terminal and start it with sudo. – A.B. May 5 '15 at 14:05
  • this is to have the privileges to be able to edit the file either in GUI ( gedit ) or in the terminal ( nano ) , maybe some one can use only one of them – Fat Mind May 5 '15 at 14:07
  • 1
    When using GEdit, it's usually good practice to use gksu or kdesu or the like in order to run the program instead of sudo. The only case where sudo would make sense here is to debug the text editor, or check for missing libraries preventing it from starting. Otherwise, it just remains open and useless and if you close it, GEdit is killed. Unfortunately Ubuntu removed gksu by default, but that is much more streamlined and works in [ALT] + [F2]. – JimmyC866 May 5 '15 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.