This is the simplest way I know to get samba up and running. This isn’t the most secure, best, smartest, etc. It’s just for testing and getting up and running as quickly as possible.
Opportunistic locking is part of the Windows client file caching mechanism. Samba implements opportunistic locking as a server-side component of the client caching mechanism. Samba/CIFS doesn’t play nice with NFS, so if you’re in a mixed environment where some windows machines access and modify the same files that Linux or Solaris touch through NFS, then disable the oplocks. This is important for things like database files to avoid corruption!