LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-20-2010, 04:29 AM   #1
oliver.fink
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Rep: Reputation: 0
Force Mount of USB-Devices as read-only


Hello,

I want all USB-Devices (Hard-disks, USB-Sticks) that are plugged into a Slackware 13 be mounted as read-only.
How do I achieve this?

Greetings and thanks for your help

Oliver
 
Old 01-20-2010, 04:49 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,202

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
Explain exactly how they are being mounted, and who can write there.
Can users mount usb sticks?
Have you any entries in /etc/fstab
 
Old 01-20-2010, 07:39 AM   #3
oliver.fink
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Original Poster
Rep: Reputation: 0
What I want ...

I want to setup some PCs as something like a KIOSKSystem.

It is a standard-Slackware 13 Installation with KDE.

And I don't want the users to carry away any files from this PC.


I hope this helps....


Greetings and thanks a lot...
Oliver
 
Old 01-21-2010, 03:22 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,202

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
OK. So kde uses some automounting tool, doesn't it. I haven't used kde in years. I see it as bloatware.
but get to that tool, and try to configure that. Also, lines in /etc/fstab are cheap. Why not add linnes for sdb1, sdb2, sdb3, sdb4, sdc1, sdc2 etc with a 'ro' option. Then all are mounted read only
 
Old 02-04-2010, 07:50 AM   #5
oliver.fink
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Original Poster
Rep: Reputation: 0
I solved it ....

I created a file in:

/etc/hal/fdi/policy/

File: mypreferences.fdi
#for all possible devices: sdb / sdc / sdd ...

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="block.device" contains="sdb">
<merge key="volume.mount.valid_options" type="strlist">umask=555</merge>
<append key="volume.mount.valid_options" type="strlist">ro</append>
<append key="volume.mount.valid_options" type="strlist">noatime</append><-->....
</match>
</device>

If the Stick is NTFS this won't work:
so I did:
/sbin/mount.ntfs -> copy to mount.ntfs.si

# added: -o ro,...

#!/bin/bash
/usr/bin/ntfs-3g $1 $2 -o ro,gid=100,dmask=002,fmask=113


Hope someone else can use this !!

Greetings Olli
 
  


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
How to force HAL to mount USB drive as UTF-8? Renan_S2 Linux - Software 4 06-21-2010 12:17 PM
USB devices read only after update motoko Linux - Laptop and Netbook 2 04-08-2009 09:41 AM
move grub to usb + mount encrypted devices from usb question Lancelot1 Linux - Security 1 02-26-2009 09:51 AM
How to use GFS 6.1 to read a mount point that accesses multiple devices aqhaone Linux - Server 0 05-15-2008 11:03 AM
Devices ,cdrom,floppy , no mount or read priv. mickeyboa Fedora 1 09-05-2004 10:46 AM


All times are GMT -5. The time now is 07:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration