LinuxQuestions.org
Review your favorite Linux distribution.
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 12-30-2004, 02:02 PM   #1
clawder
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Rep: Reputation: 0
regular user mounts and fstab (again)


Regular user (backup) can't mount file systems. Here are the particulars.

Slackware 10.0.0

/etc/fstab as follows:

/dev/hda2 swap swap defaults 0 0
/dev/hda1 / reiserfs defaults 1 1
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
/dev/hdb1 /backup/staging reiserfs noauto,users,rw,exec,umask=000 0 0
/dev/sda1 /backup/media reiserfs noauto,users,rw,exec,umask=000 0 0


The two partitions I am trying to mount are /dev/hdb1 and /dev/sda1. I am trying to mount these as user "backup"...

backup:x:1005:100:Backup System User:/backup:

The mount points are in the backup users home dir (/backup)...

drwxr-xr-x 2 backup users 48 2004-12-09 10:39 media/
drwxr-xr-x 2 backup users 48 2004-11-12 10:50 staging/

Permissions on the two devices in question are (unchanged from install)...

brw-rw---- 1 root disk 3, 65 2002-06-09 12:27 /dev/hdb1
brw-r----- 1 root disk 8, 1 1995-04-29 03:33 /dev/sda1

Permissions on mount and umount as follows...

-rwxr-xr-x 1 root bin 68804 2004-05-27 14:26 /bin/mount
-rwxr-xr-x 1 root bin 30968 2004-05-27 14:26 /bin/umount

I had made these suid to troubleshoot and was able to mount shares but that broke mounting of smb shares by a regular user (smbmnt is suid as per documentation to allow regular user mounts).

I have done a search in the slackware forums here for "fstab" and have found some suggestions which I have tried. These included changing permisions on the /dev files, other options in the fstab settings and opening up permissions fully on the mount points. So far I have only been able to mount these partitions as "backup" when mount/umount are suid.

My current system settings are as shown above.

Can anybody see problems with the above settings? I'm having a hard time figuring this one out.

Thanks for any help given and please ask if more information is needed.

Chris
 
Old 12-30-2004, 02:15 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 243Reputation: 243Reputation: 243
The umask option is for vfat or ntfs, you don't need it in your fstab.
Did you try to add backup user in disk group ? in users group ?
Or replace 'users' option by 'user'

Last edited by Cedrik; 12-30-2004 at 02:16 PM.
 
Old 12-30-2004, 02:35 PM   #3
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware-current
Posts: 1,263

Rep: Reputation: 54
these are both hard drive partitions, one of them a scsi drive. both formatted reiserfs?
 
Old 12-30-2004, 02:35 PM   #4
clawder
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Cedrik
The umask option is for vfat or ntfs, you don't need it in your fstab.
Did you try to add backup user in disk group ? in users group ?
Or replace 'users' option by 'user'
Hi, Thanks for the reply.

I have changed the two fstab lines as follows:

/dev/hdb1 /backup/staging reiserfs noauto,user,rw,exec 0 0
/dev/sda1 /backup/media reiserfs noauto,user,rw,exec 0 0

Removed umask and changed users to user as per your suggestion.

The user "backup" has a primary group of users and an additional group of disk now (added as per your suggestion)

When I try a "mount /backup/staging", "mount /backup/media", "mount /dev/hdb1" or "mount /dev/sda1" they all still fail with the error "mount: must be superuser to use mount".

Is there somewhere else that you can define that users other than "superuser" can mount? Is there something that overrides the fstab settings?

Thanks

Chris
 
Old 12-30-2004, 02:39 PM   #5
clawder
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by ringwraith
these are both hard drive partitions, one of them a scsi drive. both formatted reiserfs?
/dev/hdb1 is a single partition on a WD800JB drive (Western Digital 80GB)

/dev/sda1 is a single partition on a WD1200 drive (Western Digital 120GB) that is in a USB External Drive enclosure.

Both file systems are formatted reiserfs.

Thanks for the reply

Chris
 
Old 12-30-2004, 03:17 PM   #6
clawder
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
From reading many suggestions on the web regarding this I keep seeing mention of suid on the mount and umount binaries. Do I really have to set this as well as defining that regular users can use mount/umount on certain partitions in the fstab file?

As noted in my original post I have tested with suid on and was able to mount as user "backup" but doing so broke the ability for the regular user "backup" to mount smb shares. Currently (without suid on mount/umount) the user "backup" can mount smb shares with commands such as:

mount -t smbfs -o username=$user,password=$pass,ro //server/share /workstation/mountpoint

The samba binary smbmnt is suid to allow for this.

Thanks again

Chris
 
Old 12-30-2004, 04:52 PM   #7
urka58
Member
 
Registered: Nov 2003
Distribution: slackware 14
Posts: 542

Rep: Reputation: 33
As root try
chown -R your_login_name:users /backup/staging
chown -R your_login_name:users /backup/media
and add "suid" option at their occourences in yor /etc/fstab.
If you have some programs or character or block devices on those filesystem the options "exec" and "dev" amy be required.
The user(s) option make "nosuid" "noexec" and "nodev" taking effect automatically.
Hope this helps
Ciao
 
Old 12-31-2004, 12:37 PM   #8
clawder
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by urka58
As root try
chown -R your_login_name:users /backup/staging
chown -R your_login_name:users /backup/media
and add "suid" option at their occourences in yor /etc/fstab.
If you have some programs or character or block devices on those filesystem the options "exec" and "dev" amy be required.
The user(s) option make "nosuid" "noexec" and "nodev" taking effect automatically.
Hope this helps
Ciao
Thanks

I had done the chown -R on both of the mount points and had tried setting suid on both fstab entries, unfortunatly it made no difference.

Mounting those two shares as the user "backup" was the last thing I needed to have happen so I ended up just setting up a couple of sudo entries to allow for that. This keeps the ownership of the mount points as "backup" as well. Reason I mention that is when I had made the mount binary suid, each time I then did a mount as the user "backup" it would change ownership of the mountpoints to root. I'm not sure if that is the proper behavior of mount once suid(ed) but that is how things affected me.

Thanks to everyone that gave ideas

Happy New Year!!

Chris
 
  


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
No access to NTFS mounts for regular user account lowpro2k3 Slackware 5 10-23-2005 05:21 PM
samba mounts in fstab Zurvan Linux - Networking 5 04-17-2005 10:13 AM
fstab to define mounts on boot PhiMati Fedora 1 06-18-2004 05:29 PM
How to edit mounts - fstab problems... muzicman82 Linux - General 3 01-29-2004 10:06 PM
switching mounts in fstab elpresidente Linux - General 6 07-09-2002 07:54 PM

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

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