LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-08-2014, 02:35 AM   #1
akhilesh_03
LQ Newbie
 
Registered: Apr 2014
Posts: 23

Rep: Reputation: Disabled
How to block USB except Data Card


Hi all,

How to block USB(storage devices only)in UBUNTU 12.04 but It should allow Data Card for the Internet access ??

Is there any way to do this ??

Thanks
 
Old 05-08-2014, 07:10 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I believe you will have to rebuild the Ubuntu 12.04 kernel and remove any options for USB data storage devices. Plus also make sure that no shared library modules are available on the system which serve that same purpose.
 
1 members found this post helpful.
Old 05-08-2014, 08:00 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
I'd agree at first thought about what rtmistler suggested. It should stop it completely.

I do wonder if user permissions could be configured to do that too. Some distro's offer a greater degree of permissions. I think one is mounting usb drives.
 
1 members found this post helpful.
Old 05-09-2014, 07:37 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Close but not exactly.

In thinking about jefro's comment I did some minor research. I have 12.04 at another location and the system I'm working with now has 10.04. (Yeah I know, VERY outdated version!)

Looking at the groups for a user, there wasn't anything obvious, like a "mount" group. And of course there are a lot of groups so learning the exact description of anything that may be close would be a little tough.

Under the user settings management UI they have an Advanced tab and specifically in there (Again for 10.04) there's a checkbox under the User Privileges tab which says "Access external storage devices automatically"; however that would mean auto-mounting; right? Not restricting the user from being able to mount. There are a variety of other options, but I don't see one specifically for that. I think if one were to un-check that particular property, it would merely mean that the user could mount a USB drive, they just would not see it auto-mount for them. Which is weird. I suppose back in the day when you had to mount everything and before auto-mounting became the norm; it might annoy someone who was used to always doing the actions to have the system jump ahead of them. And yes I can see some cases where a person does not want the drive mounted because their intentions are to do something advanced with it and as a result they'd have to umount to reverse the system's automatic actions.

Either case 12.04 may not have this property, it further does not appear to be exactly what you were seeking.

To make it worse, I'm also wondering if you wished to block per user, but allow root to mount a USB drive. And that would be a natural choice, but worse of a situation because the tactic of not compiling in the driver would be universal for all users, including root.
 
1 members found this post helpful.
Old 05-09-2014, 08:18 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
http://askubuntu.com/questions/23003...ad-of-the-user

Reverse that.


https://help.ubuntu.com/community/Mo...ser_Privileges

Remove that.

Last edited by jefro; 05-09-2014 at 08:20 PM.
 
1 members found this post helpful.
Old 05-13-2014, 12:35 AM   #6
akhilesh_03
LQ Newbie
 
Registered: Apr 2014
Posts: 23

Original Poster
Rep: Reputation: Disabled
Hi,

Thank you all for your reply.

Thanks
 
  


Reply



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
TataPhotonMax USB Data Card is not deducting in Linux RHEL5 sekarlinux Linux - Newbie 1 11-29-2012 04:38 AM
[SOLVED] USB data card is not detecting in 2.6.36 kernel mvkrishna86 Linux - Newbie 2 01-11-2011 11:58 PM
Read/Write data to SD card physical address by USB Reader in Fedora 7 yuanlaidewo Linux - Newbie 0 07-14-2008 10:18 PM
problem with airtel data card(USB) conf chakribobby Linux - Newbie 1 02-03-2008 07:56 AM
USB CF Card Reader/Write not a valid block device cromwell Linux - Hardware 10 01-06-2004 10:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:40 AM.

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