Samba Guru Needed (Help!)

By Tritonsmoon ·
I have setup a Samba share on SuSE Linux Enterprise v10.2. My users can use the share fine. However, two Windows users can edit the same file at the same time. How can I make it so the file is locked when a user has it open?

I can post the smb.conf file if requested.


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

I could be wrong but....

by robo_dev In reply to Samba Guru Needed (Help!)

I think what you need to do is disable oplocks (opportunistic locking) in Samba.

Some applications (e.g. MS-Office or MS-Access) do not get along with oplocks in samba.

Collapse -

smb.conf file

by Tritonsmoon In reply to I could be wrong but....

I've been through that document and this is my smb.conf:

comment = Buyers Share
path = /winshare/buyers
read only = No
create mask = 0774
oplocks = No
level2 oplocks = No
strict locking = Yes

There is mention of modifying the registry keys in Windows, but do I really want to do that to 30+ PC's? That sounds like a lot of admin overhead.
Has anyone else had this specific issue?

Thanks for the reply robo_dev.

Collapse -

What file/type and application are you trying to lock?

by robo_dev In reply to smb.conf file

are these word documents, text files???

Collapse -

File Types

by Tritonsmoon In reply to What file/type and applic ...

Eventually it will be word, excel, etc.
Right now I am just trying a text file. I want to start basic and work my way up. :)

Collapse -

Anyone Else??

by Tritonsmoon In reply to File Types

Does anybody else have any suggestions? I don't want to make a bunch of insignificant changes. It seems like it's a configuration setting I just don't know where.

Collapse -

hmmm...since you've got strict locking enabled.....

by robo_dev In reply to Anyone Else??

how are these two users authenticating to the server?

Maybe somehow if both these windows users show up as one user (e.g. guest) then samba would share all the time.

Do you have other Windows users who are working properly?

Collapse -

Both are users in the samba users file

by Tritonsmoon In reply to hmmm...since you've got s ...

I've created all the users in the samba users file. They each have their own username and password.

When I look at the SWAT status page I can see the individual users and what files they have open.

None of the users work correctly, Windows OR Linux. Neither of them are notified that a file is open, locked, in use, etc. They don't receive any notification.

Collapse -

If neither Linux or Windoze users work...

by robo_dev In reply to Samba Guru Needed (Help!)

Note that Samba does not seem to enforce locking when accessed with more than one protocol, and it can get confused even with multiple network paths to the server!

multiple protocol meaning both NFS and SMB.

I wish I had a solution....

a google search on suse samba locking not working yielded 28,000 hits, so you're not alone.

Collapse -


by Tritonsmoon In reply to If neither Linux or Windo ...

I appreciate the input. I'll keep trying.

Related Discussions

Related Forums