You are not logged in.

#1 2004-03-31 15:10:45

Registered: 2004-03-04
Posts: 11

How to allow users to mount a Samba shares on a WXP

Through lots of reading I've managed to get an understanding of how to mount SMB shares at bootup by placing the proper edits in /etc/fstab. While having the shares of the server, running SME Server 6.01 (recently known as Mitel SME Server) and acting as a samba server, being mounted at startup is perfect since the server is always on. This is not the best idea for the XP workstation since it isn't always on. Here is a copy of my present fstab file with x's replacing the passwords.

fstab               [B---]  0 L:[  1+19  20/ 21] *(1085/1086b)= .  10 0x0A
# /etc/fstab: static file system information
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /proc         proc      defaults            0      0
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0
tmpfs                  /tmp          tmpfs     defaults            0      0
sysfs                  /sys          sysfs     defaults            0      0
usbdevfs               /proc/bus/usb usbdevfs  defaults            0      0

/dev/cdroms/cdrom0     /mnt/cd   iso9660   ro,user,noauto,unhide   0      0
/dev/cdroms/cdrom0     /mnt/dvd  udf       ro,user,noauto,unhide   0      0
/dev/floppy/0          /mnt/fl   vfat      user,noauto,unhide      0      0
//    /mnt/silicon2 smbfs username=kingnubian,password=xxxxxxx,user
//   /mnt/silicon1 smbfs username=kingnubian,password=xxxxxxx,users,noauto

/dev/discs/disc0/part5 swap swap defaults 0 0
/dev/discs/disc0/part1 / xfs defaults 0 1

I would like users with an account on the Linux box to mount the remote share on the XP box without needing to SU and consequently need the root password. When trying now to mount "e-smith" (The share on the XP box) as a user using "mount /mnt/silicon1" I get a message about needing to be SU.


#2 2004-04-03 13:24:02

From: Oslo, Norway
Registered: 2003-11-23
Posts: 169

Re: How to allow users to mount a Samba shares on a WXP

To allow users to mount smb shares you need to make smbmnt suid:

# chmod +s /usr/bin/smbmnt

Note however that the user needs to own the directory used as mountpoint. So I don't know how to make 'mount /mnt/silicon1' in your setup work for all users.

For the users to be able to unmount the smb shares as well you need:

# chmod +s /usr/bin/smbumount

Now users can do 'smbmount //server/share mountpoint -o username=whatever' or simply 'mount mountpoint' if the details are specified in fstab. To unmount root can do 'umount mountpoint' or users can do 'smbumount mountpoint'.

Don't confuse smbmount with smbmnt - the first is the command you use to mount shares manually, the second is the one that should be suid and is used both by smbmount and by mount -t smb.

Hope this helps.


All of your mips are belong to us!!


Board footer

Powered by FluxBB