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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-13-2010, 11:47 PM
|
#1
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Rep:
|
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.
|
|
|
04-13-2010, 11:58 PM
|
#2
|
Member
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624
Rep:
|
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:
Then run:
|
|
|
04-14-2010, 12:04 AM
|
#3
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Original Poster
Rep:
|
is there any source code for this detection of devices
|
|
|
04-14-2010, 12:37 AM
|
#4
|
Member
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242
Rep:
|
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 01:50 AM.
|
|
|
04-14-2010, 02:22 AM
|
#5
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Original Poster
Rep:
|
hi
thank u sir ,.
but one question sir if i write external program for this how could i deal with this ?
|
|
|
04-14-2010, 02:40 AM
|
#6
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Original Poster
Rep:
|
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 07:30 AM.
Reason: Fix title
|
|
|
04-14-2010, 05:16 AM
|
#7
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
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.
|
|
|
04-14-2010, 07:34 AM
|
#8
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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?
|
|
|
04-14-2010, 07:56 AM
|
#9
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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 08:01 AM.
|
|
|
All times are GMT -5. The time now is 11:37 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|