The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
restrict in file creation nk_bastia UNIX for Dummies Questions & Answers 4 11-18-2008 02:28 AM
How to restrict Highports in AIX 5.2 balareddy AIX 0 09-01-2008 05:11 AM
restrict commands mm00123 SUN Solaris 4 05-11-2008 10:08 AM
Possible to restrict SED braindrain Shell Programming and Scripting 7 12-12-2006 01:03 PM
How to restrict account to one log-in? Egroman UNIX for Dummies Questions & Answers 0 09-02-2004 04:59 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 4.00 average. Display Modes
  #1 (permalink)  
Old 06-29-2009
shivarajM shivarajM is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 12
Arrow restrict USB

Hi,

How can i restrict use of USB in redhat. & also is it possible to allow USB devices for only specific devices or only few known penDrives......?

Thank you
  #2 (permalink)  
Old 06-29-2009
nj78 nj78 is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 108
Maybe try to comment out the services? Not sure about the second part.
  #3 (permalink)  
Old 06-30-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,893
USB devices are "linked" to the system using "udev" control scripts. /etc/udev contains all the scripts and rules that are processed when a new device is added to the system. You can do "man 7 udev" explains how it works. You might have something like this rule:

Code:
SUBSYSTEM=="usb_device"  OPTIONS=ignore_device

will completely disable all USB devices. Note, this rule has to come pretty early in the chain, so put it in the file 05-udev-early.rules. Anywhere, from there, you add exceptions (more rules) which match specific device drivers or device names.
Bits Awarded / Charged to otheus for this Post
Date User Comment Amount
06-30-2009 nj78 N/A 100
  #4 (permalink)  
Old 06-30-2009
nj78 nj78 is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 108
Thanks for this, interesting, never have had to use this.
  #5 (permalink)  
Old 07-01-2009
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,941
Modifying your udev scripts does not stop a knowledgable user from manually mounting a USB stick. It only stops the OS from automatically mounting the USB stick. You also need to ensure that users do not have permission to mount removable devices.
Reply

Bookmarks

Tags
usb;restrict

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0