LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-14-2010, 12:47 AM   #1
mandars
LQ Newbie
 
Registered: Apr 2010
Posts: 8

Rep: Reputation: 0
Question try to secure usb port of system on linux platform.


hi i want to lock my usb port of system.i am using linux fedora 11 operating system. so for that purpose i want to know or i want the detection code that help to detect any external devices plug in to system.
 
Old 04-14-2010, 12:58 AM   #2
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 623

Rep: Reputation: 64
If you want to disable the usb, you can do it in the follwing way:
Open /etc/modprobe.conf file and turn off auto loading by adding:

Quote:
alias usb_storage off
Then run:
Quote:
#modprobe -r usb_storage
 
Old 04-14-2010, 01:04 AM   #3
mandars
LQ Newbie
 
Registered: Apr 2010
Posts: 8

Original Poster
Rep: Reputation: 0
is there any source code for this detection of devices
 
Old 04-14-2010, 01:37 AM   #4
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
some udev rules might help..then you can run a program when certain device is detected

You could for example change ownership or permissions for that device

SUBSYSTEMS=="usb", DRIVERS=="usb",MODE="0600", OWNER="unics", SYMLINK+="usbdevice_%k"
the only usb device that I have is a floppy...

you can be more specific using ATTRS{some identification} ...I guess sky is the limit
you ca use string pattern matching etc etc
using external programs you can log all the usb devices conected, because udev variables can be accessed by external scripts

Last edited by ddaemonunics; 04-14-2010 at 02:50 AM.
 
Old 04-14-2010, 03:22 AM   #5
mandars
LQ Newbie
 
Registered: Apr 2010
Posts: 8

Original Poster
Rep: Reputation: 0
hi

thank u sir ,.
but one question sir if i write external program for this how could i deal with this ?
 
Old 04-14-2010, 03:40 AM   #6
mandars
LQ Newbie
 
Registered: Apr 2010
Posts: 8

Original Poster
Rep: Reputation: 0
detection of devices on usb port

hi guys,


i m student of fergusson clg (pune)india.
i am doing project on usb port on linux platform.
i want to know hw detection of external devices happen when u plug it thrugh usb port.
i want any code for this detection so i set permission for accesing that device.
will u help me plzzzzzzz.




regards

Last edited by pixellany; 04-14-2010 at 08:30 AM. Reason: Fix title
 
Old 04-14-2010, 06:16 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198Reputation: 1198
This is the same question as:That's not nice -- it's against LQ rules for very good reasons like it wastes people's time answering a question that may already have been answered and it makes it harder for people searching later for solutions to a similar problem.
 
Old 04-14-2010, 08:34 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,805

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Please use descriptive titles, and do not say things like "please solve". I put in a better title.
Also, please do not use texting shorthand here---spell out you words and use caps, punctuation, etc.

Have you read up on things like hal and udev? What have you found on Google?
Quote:
i want any code for this detection so i set permission for accesing that device.
What does this mean?
 
Old 04-14-2010, 08:56 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,805

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
closed all the duplicates---and merged with the original (closely related) thread
mandars;
Only one thread per topic, please

Last edited by pixellany; 04-14-2010 at 09:01 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Red Hat expands its Linux System Management Platform LXer Syndicated Linux News 0 09-02-2009 05:12 PM
Not getting usb 2.0 speeds or port on my system shirishag75 Linux - Hardware 1 01-31-2009 06:02 AM
how to port linux kernel 2.6 V to ARM PXA platform. zahidul Linux - Newbie 1 09-26-2008 06:12 PM
LXer: First Linux System Platform For Mobiles From a la Mobile LXer Syndicated Linux News 0 06-21-2006 01:33 PM
LXer: University of Michigan Selects SSH Tectia for Secure System Administration and Secure File Transfers LXer Syndicated Linux News 0 04-25-2006 01:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration