Wednesday, 24 October 2012 09:23

KLUDGE: Overcoming the connections restrictions on a non Windows Server smb client using Linux and samba.

At a school I work for we have the School Administration software (Wauton Samuel) running on a Windows XP pro machine. Originally this was shared with mapped drives with just the office staff (2 users) and was not a problem. An automated register system was installed which over time has pushed the minimum number of required connections to 14. This also assumes that unneeded connections get dropped which they seldom do but that's a different issue.

To attempt to workaround this without moving the entire shared folder to a Windows Server (which I know would involve a lot of pain) I used this workaround:-

A) Mount the share using Samba on Linux.

B) Share the mounted Share back out from the Linux machine.

To do this I did the following:-

1) Create a user account for the linux server on the Windows Machine and give it a password.

2) Create a new mount point on the linux server:-

mkdir /mnt/newshare

3) In /etc/fstab on the the linux machine add a line like

//windowsmachine/existingshare      /mnt/newshare             cifs    username=newuser,password=passwordfornewuser 0 0

4) Edit /etc/samba/smb.conf and share the new mount point.

comment= This a reshared folder
path = /mnt/newshare
public = yes
writable = yes
browseable = yes
valid users = @Staff , root, "@AdminStaff", @Administrators



The dollar-sign on the end of newshare$ is added because I want the share to be hidden on the network.

My valid users list is authenticated against the main Domain Controllers active directory using winbind etc. The @items are usergroups.

The password is visbile to other linux users in the fstab. This can be got around by doing something like this

Related items

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.