LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2009, 09:51 AM   #1
drjay1627
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
fstab question


Hello,

I need help with answering a couple of questions. Yes its a homework.

Question 1:

Some Linux's (e.g. RHEL-5) allow a system administrator to set it up so users can do some mount operations, for example they can set it up so a user could stick a CD into the CDROM drive and then without root
privileges use the mount command to mount it. How can this be done?

My Answer:

In the /etc/fstab file, under <option> tab be "user". If "default" then mount can be done only as root.

** Is this a suitable answer for this question?

Question 2:

For (1) to work, in addition to the setup the sys-admin needs
to do, there needs to be something special about the mount executable
on Linux. This special thing has been demonstrated in class in
relation to something else. What is it? Hint: mount(2) still needs
to be called as the root user even on Linux.

My Answer:

rw,noexec,nosuid,nodev,shortname=winnt,uid=(something)

** something similar to this...

I'm really not sure with the second answer. Actually I'm not sure how to articulate my answer. Much appreciated if someone can point me in the right direction.

Thanks

drjay
 
Old 10-01-2009, 09:56 AM   #2
cpuobsessed
Member
 
Registered: Jan 2006
Distribution: Fedora, Ubuntu, Slackware
Posts: 56

Rep: Reputation: 15
Look on tldp.org, they have documentation on all linux commands. Try "man mount" and "man fstab" if you have a linux or unix system available.
 
Old 10-01-2009, 10:23 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Quote:
Originally Posted by drjay1627 View Post
Question 2:

For (1) to work, in addition to the setup the sys-admin needs
to do, there needs to be something special about the mount executable
on Linux. This special thing has been demonstrated in class in
relation to something else. What is it? Hint: mount(2) still needs
to be called as the root user even on Linux.

My Answer:

rw,noexec,nosuid,nodev,shortname=winnt,uid=(something)
Note that the question itself gives you an important tip. Whatever you are looking for is a property of the mount executable file (usually /sbin/mount), so you should be looking at the properties of this file, and not in your fstab file
 
Old 10-01-2009, 10:36 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Here's the equivalent line from an ubuntu 8.04 system
Code:
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
It's the "user" group that does what you are looking for (?).
 
Old 10-01-2009, 10:51 AM   #5
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
The 2nd question seems to be talking about setting SUID on /bin/mount.
 
Old 10-01-2009, 10:54 AM   #6
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
This link tells us the following about the fstab options:
user / users / nouser
user permits any user to mount the filesystem. This automatically implies noexec, nosuid, nodev unless overridden. If nouser is specified, only root can mount the filesystem. If users is specified, every user in group users will be able to unmount the volume.

I typically use "users" instead of "user" on a system w/ more than one user (i.e. not my desktop). This way, if one user mounts a CD, logs out, and leaves, another user can unmount it so they can use the CD drive.

HTH

Forrest
 
Old 10-01-2009, 01:45 PM   #7
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.1 with Cinnamon & KDE
Posts: 1,478
Blog Entries: 3

Rep: Reputation: 95
Quote:
Originally Posted by forrestt View Post
...
I typically use "users" instead of "user" on a system w/ more than one user (i.e. not my desktop). This way, if one user mounts a CD, logs out, and leaves, another user can unmount it so they can use the CD drive.
...
'user' and 'users' are both keywords when used as mount command options
Code:
mount -o user /some/thing /some/where

mount -o users /some/thing  /some/where
With 'user' any individual uid has permission to mount the file system and the uid that mounted the file system is permitted to unmount it. The same uid does both

With 'users' any individual uid has permission to mount the file system and any individual uid has permission to unmount the file system.
The same uid might do both but do not need to.

The keyword 'group' behaves similar to 'users' but requires that the gid of the mounting or unmounting process match the owner gid of the device.

The keyword 'owner' behaves in a similar way, but only a device owner process may mount or unmount.

~~~ 0;-Dan
 
  


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
Question about fstab centosfan Linux - General 3 08-14-2009 03:11 PM
fstab question morphynoman Linux - Newbie 11 11-24-2008 06:38 PM
fstab question cjstm Linux - Newbie 1 12-12-2004 03:46 PM
fstab question. buckwheat12 Fedora 6 03-05-2004 07:31 PM
i have an fstab question... isajera Linux - General 7 12-21-2001 03:48 PM


All times are GMT -5. The time now is 12:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration