Koozali.org: home of the SME Server

NOOB to Samba Mounts of Local windows shares. SME 7.0

Skydiver

NOOB to Samba Mounts of Local windows shares. SME 7.0
« on: August 08, 2006, 01:53:36 AM »
Hi please offer advice on best option for mounting local shares on windows XP workstations as a Samba mount to local users home folder.

I would like to make the files on the local shares available to local users within the Domain: Some folders have read only options and others READ / WRITE

Anyone doing this have advice on best procedure:
Im looking for a simple way to do this and have it auto run on startup

Please no flaming im just trying to learn and yes i have searched the forums for the best way to go about this.

First i created the shares on the local work station and added the user permissions for the Domain User:
I created the folders in both the /mnt/samba and /home/e-smith/files/users/username1,2,3,4,5,6 etc

Problems noted so far are as follows:
Mounts seem to work but when i use:

mount -t smb //192.168.1.118/private$ /mnt/samba/user1/private -o rw,username=myusername,password=*********,uid=myusername
or
mount -t smb //192.168.1.118/private$ /mnt/samba/user1/private -o rw,username=myusername,password=*********,gid=groupname

For the first (uid=myusername) it seems to only work if i use this once in the file and no matter what i try with (gid= groupname) it fails.

So it seems my files once shared are read only

This is what i am testing from command line as an executable file named :

./sambamounts


Contents:

#!/bin/bash
mount -t smb //192.168.1.118/private$ /mnt/samba/user1/private -o rw,username=myusername,password=*********,uid=myusername
mount --bind /mnt/samba/user1/private /home/e-smith/files/users/username1/home/private

mount -t smb //192.168.1.118/downloads /mnt/samba/user1/downloads -o username=myusername,password=***********
mount --bind /mnt/samba/user1/downloads /home/e-smith/files/users/username1/home/downloads
mount --bind /mnt/samba/user1/downloads /home/e-smith/files/users/username2/home/downloads
mount --bind /mnt/samba/user1/downloads /home/e-smith/files/users/username3/home/downloads
mount --bind /mnt/samba/user1/downloads /home/e-smith/files/users/username4/home/downloads
mount --bind /mnt/samba/user1/downloads /home/e-smith/files/users/username5/home/downloads
mount --bind /mnt/samba/user1/downloads /home/e-smith/files/users/username6/home/downloads

#mount -t smb //192.168.1.118/music /mnt/samba/user1/music -o username=myusername,password=**********
#mount --bind /mnt/samba/user1/music /home/e-smith/files/users/username1/home/music
#mount --bind /mnt/samba/user1/music /home/e-smith/files/users/username2/home/music
#mount --bind /mnt/samba/user1/music /home/e-smith/files/users/username3/home/music
#mount --bind /mnt/samba/user1/music /home/e-smith/files/users/username4/home/music
#mount --bind /mnt/samba/user1/music /home/e-smith/files/users/username5/home/music
#mount --bind /mnt/samba/user1/music /home/e-smith/files/users/username6/home/music
#mount --bind /mnt/samba/user1/music /home/e-smith/files/ibays/music/html/mp3s

mount -t smb //192.168.1.118/NewMusic /mnt/samba/user1/NewMusic -o username=myusername,password=**********
mount --bind /mnt/samba/user1/NewMusic /home/e-smith/files/users/username1/home/NewMusic
mount --bind /mnt/samba/user1/NewMusic /home/e-smith/files/users/username2/home/NewMusic
mount --bind /mnt/samba/user1/NewMusic /home/e-smith/files/users/username3/home/NewMusic
mount --bind /mnt/samba/user1/NewMusic /home/e-smith/files/users/username4/home/NewMusic
mount --bind /mnt/samba/user1/NewMusic /home/e-smith/files/users/username5/home/NewMusic
mount --bind /mnt/samba/user1/NewMusic /home/e-smith/files/users/username6/home/NewMusic

mount -t smb //192.168.1.118/Videos /mnt/samba/user1/Videos -o username=myusername,password=**********
mount --bind /mnt/samba/user1/Videos /home/e-smith/files/users/username1/home/Videos
mount --bind /mnt/samba/user1/Videos /home/e-smith/files/users/username2/home/Videos
mount --bind /mnt/samba/user1/Videos /home/e-smith/files/users/username3/home/Videos
mount --bind /mnt/samba/user1/Videos /home/e-smith/files/users/username4/home/Videos
mount --bind /mnt/samba/user1/Videos /home/e-smith/files/users/username5/home/Videos
mount --bind /mnt/samba/user1/Videos /home/e-smith/files/users/username6/home/Videos


mount -t smb //192.168.1.118/Games /mnt/samba/user1/Games -o username=myusername,password=**********
mount --bind /mnt/samba/user1/Games /home/e-smith/files/users/username1/home/Games
mount --bind /mnt/samba/user1/Games /home/e-smith/files/users/username2/home/Games
mount --bind /mnt/samba/user1/Games /home/e-smith/files/users/username3/home/Games
mount --bind /mnt/samba/user1/Games /home/e-smith/files/users/username4/home/Games
mount --bind /mnt/samba/user1/Games /home/e-smith/files/users/username5/home/Games
mount --bind /mnt/samba/user1/Games /home/e-smith/files/users/username6/home/Games

mount -t smb //192.168.1.118/WebsiteDesign /mnt/samba/user1/WebsiteDesign -o username=myusername,password=**********
mount --bind /mnt/samba/user1/WebsiteDesign /home/e-smith/files/users/username1/home/WebsiteDesign
mount --bind /mnt/samba/user1/WebsiteDesign /home/e-smith/files/users/username2/home/WebsiteDesign
mount --bind /mnt/samba/user1/WebsiteDesign /home/e-smith/files/users/username3/home/WebsiteDesign
mount --bind /mnt/samba/user1/WebsiteDesign /home/e-smith/files/users/username4/home/WebsiteDesign
mount --bind /mnt/samba/user1/WebsiteDesign /home/e-smith/files/users/username5/home/WebsiteDesign
mount --bind /mnt/samba/user1/WebsiteDesign /home/e-smith/files/users/username6/home/WebsiteDesign

dvdsmith

Noob helping a Noob
« Reply #1 on: August 09, 2006, 10:21:09 PM »
I have a suggestion, provided you would be willing to instead host the files on the SME Server.  I don't pretend to be a guru so someone tell me if I'm way off the mark.  What I suggest below is based on my own kludging around with SME.  My solution involves Ibays and a knowledge of WinSCP and symlinks.  Personally, I think this might be a little more elegant and easier to maintain.

Setup a usergroup including username1 thru username6

Create ibays, for example;
ibay "readwrite", where usergroup has read and write access
ibay "readonly", where admin has write access and usergroup only read access

Using WinSCP, login to the server as root (using SCP protocol, not SFTP).

Browse to /home/e-smith/files/ibays/readonly
Right-click on the "files" folder, choose Properties, and change owner to "username1".  You can do the same for the ibay "readwrite", but I don't think its necessary.

Now the tedious part.  Within WinSCP, goto each user accounts personal folder;
i.e. /home/e-smith/files/users/username1/home
Within each, create a simlink to each ibay you wish to share.  For example,  right-click within home folder, choose New > Link, name it "readwrite" and point it to /home/e-smith/files/ibays/readwrite/files.  I'll point out that the owner of the symlink is "root", therefore the user cannot accidently delete it.

AFAIK, from the XP users point-of-view, this should appear the same as if you had created all the mounted folders as you described.  Username1 will have full read-write access to all the files and the file sharing task is on the server where it belongs.

I hope this helps. :)

Skydiver

Samba & Windows Shares
« Reply #2 on: August 09, 2006, 11:33:12 PM »
Hi thanks for the idea you have, i do like it and will test it with a couple projects i have.

The isssue with this project is, its my own personal server for my children etc. The server hardware is not new or anything excitting (P3 - 800).

The drive i just purchased for the server is a 320gb IDE drive, once i returned home with it, I found the motherboard only reconized the drive as a 136gb.

I flashed the BIOS and tried again and found the drive still 136gb.  So i decided to place the drive in my work station and share the files some how.


Any ideas

Skydiver

dvdsmith

NOOB to Samba Mounts of Local windows shares. SME 7.0
« Reply #3 on: August 10, 2006, 01:05:31 AM »
Quote
The drive i just purchased for the server is a 320gb IDE drive, once i returned home with it, I found the motherboard only reconized the drive as a 136gb.

IDE controller cards for larger drives can be found on newegg.com and other sites cheap ($12 USD and up).  What I don't know is which ones are natively supported by CentoOS 4.3 (not requiring drivers).  Anyone have a recommendation?

Offline wjhobbs

  • *****
  • 171
  • +0/-0
    • http://www.chryxus.ca
Re: Samba & Windows Shares
« Reply #4 on: August 10, 2006, 03:40:14 AM »
Quote from: "Skydiver"
The drive i just purchased for the server is a 320gb IDE drive, once i returned home with it, I found the motherboard only reconized the drive as a 136gb.

Have you actually tried to use it under SME/Linux?

I have been wrong so many times before but ... my understanding was that Linux does not get drive size information from the bios but goes directly to the drive. I have put 160, 200 & 300GB drives on very old machines. Where Windows would take the bios values and choke, Linux just deals with the drive and allows you to create partitions and add filesystems without problems.

Let us know what success you have.

John
...

Skydiver

SME Samba mounts
« Reply #5 on: August 10, 2006, 11:40:43 PM »
Hi the issue was i tried to ghost the 80gig hard drive to the 320 and everything seem to go perfect untill i put the 320 into the server and tried to boot on it. I was also thinking in the same way,

I used my work station to complete the ghost because it could see the 320 drive for what it was.
For some reason it did not like the drive once i placed it back in the Server that did not support the 320 IDE. I then flashed the Bios and found the same result.

Thinking maybe its time to spend some dollars and replace the server motherboard with something that will support larger drives.