Ubuntu 11.10 + SAMBA installed on a dual boot WinXP box. All user data is on Win ntfs partitions. There are other Windows machines in the same workgroup and both the SAMBA and Windows workgroups have the same name [and are so configured in the smb.conf file].

SAMBA has a nice GUI for server configuration, however there is no simple point and click option to have SAMBA automatically mount a device or a share [such as a local windows partition on this dual boot installation] on boot and login. In fact, to configure the share in SAMBA, it must be mounted manually in Nautilus. There is no issue getting pysdm to mount a device on login [although pysdm crashes on 11.10] - or going through the pain of gksudo gedit /etc/fstab.

The point is getting SAMBA to mount the device and browse it as part of the network. SAMBA can open and browse other machines in the workgroup, but devices on the local machine cannot be browsed as part of the workgroup, even when the device is mounted locally. The device/share can only be browsed locally as a mounted local device, and attempting to browse as part of the network gets an "unable to mount location - failed to mount Windows share" error. SAMBA sees the machine name and the shares within, but trying to browse gets the above error.

To allow [local] access to the device requires a manual single click in Nautilus to mount the device(s) in question. Seems reasonable, that if the device is mounted and can be accessed by the user locally, SAMBA should be able to browse the share as part of the network [workgroup], however, that is not the case. Even if the local share was the only member of the workgroup, seems it should be browsable as a network device.

Is there a simple [aka gui] way to get SAMBA to mount the device and browse it as part of the workgroup [and why is that not offered in the SAMBA server configuration]?

| improve this question | | | | |
  • You completely misunderstand what SAMBA is. It has nothing to do with mounting a local disk partition. SAMBA is for accessing shared folders on another computer over the network, or sharing local folders to other computers over the network. – psusi Feb 9 '12 at 19:18

Samba does not mount anything. That is the job of the OS. Once a filesystem is mounted, samba can expose any part of that filesystem as a share to your network using the SMB (CIFS) protocol.

I think what you need to do is mount your windows partition, then edit your smb.conf to share out whatever part of the folder tree you need.

To get the list of partitions on your local disk, use the fdisk command:

ubuntu@sid:/etc$ sudo fdisk -l
[sudo] password for ubuntu: 

Disk /dev/sda: 10.2 GB, 10202050560 bytes
255 heads, 63 sectors/track, 1240 cylinders, total 19925880 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d0afb

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758    19924991     9711617    5  Extended
/dev/sda5          501760    19924991     9711616   8e  Linux LVM

Now you can see what filesystems are on which devices. You'll be looking for something that says FAT32 or NTFS in the right hand column. Now you just need to mount that particular device on a mountpoint in your filesystem. This requires that you create a folder that you want mount the filesystem into.

mount -t ntfs -o nls=utf8,umask=0222 /dev/sda3 /mnt/winlocal

The command above is just an example... You'll need to modify for you environment.

Once this is working, you can create an entry in your fstab file to do this at boot.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.