[Samba] Re: Freebsd + Samba + Ldap + Acls - No locking file

2007-08-15 Thread vwdragon

When I use option force user = root then:

user1 open file test3.ods

Samba version 3.0.25a
PID Username  Group Machine
---
 2104   user2   Domain Users  0dragon0 (192.168.50.248)
 2103   user1Domain Users  djmusic  (192.168.50.250)

Service  pid machine   Connected at
---
Baza Firm2104   0dragon0  Thu Aug 16 05:29:26 2007
Baza Firm2103   djmusic   Thu Aug 16 05:29:26 2007

Locked files:
Pid  UidDenyMode   Access  R/WOplock 
   SharePath   Name   Time

--
2103 0  DENY_WRITE 0x2019f RDWR  EXCLUSIVE+BATCH 
 /work/samba/bazafirm   test3.ods   Thu Aug 16 05:32:28



user2 open file test3.ods (file is open read mode)

smbstatus:

Locked files:
Pid  UidDenyMode   Access  R/WOplock 
   SharePath   Name   Time

--
2103 0  DENY_WRITE 0x2019f RDWR   LEVEL_II 
   /work/samba/bazafirm   test3.ods   Thu Aug 16 05:32:28



Why? This is working only if I set option force user = root???

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Freebsd + Samba + Ldap + Acls - No locking file

2007-08-13 Thread vwdragon

Hello..

File server freebsd 6.2-STABLE + samba-3.0.25a + ldap + acls

Problem:

I've a situation where file locking does not seem to be functioning as 
expected, in that

more than one user can open and write to a file without any
notifications being displayed about the file already being opened by
another user.

I have two Windows XP clients accessing the same shared file, user1 has
the file open. User2 then opens the
same file, receiving no warnings about the file being open by another
user. File is modified by user1 and saved and remains open. File then
modified by user2 and saved. File closed and opened by user1 who
sees only modifications made by user2.

user1 (WinXP) open test2.ods

smbstatus:
Locked files:
Pid  UidDenyMode   Access  R/WOplock 
SharePath   Name   Time

--
1475810004  DENY_WRITE 0x2019f RDWR   EXCLUSIVE+BATCH 
/work/samba/bazafirm   test2.ods   Wed Aug  1 17:50:15

1475810004  DENY_NONE  0x11RDONLY NONE
/work/samba/bazafirm   .   Wed Aug  1 17:49:47

user2 (WinXP) open file:
smbstatus:
Locked files:
Pid  UidDenyMode   Access  R/WOplock 
SharePath   Name   Time

--
1478710002  DENY_WRITE 0x2019f RDWR   EXCLUSIVE+BATCH 
/work/samba/bazafirm   test2.ods   Wed Aug  1 17:55:38
1478710002  DENY_NONE  0x11RDONLY NONE 
/work/samba/bazafirm   .   Wed Aug  1 17:55:12



But when I use option force user = root tha file lock works OK!!!


smb.conf

[global]
   dos charset = cp852
   unix charset = iso8859-2
   display charset = iso8859-2
   workgroup = COSTAM.LOCAL
   netbios name = DRAGON
   server string = COSTAM LDAP PDC [on FreeBSD :: Samba server %v]
   interfaces = 192.168.50.254/24
   bind interfaces only = Yes
   security = USER
   encrypt passwords = Yes
   update encrypted = No
   client schannel = Auto
   server schannel = Auto
   allow trusted domains = Yes
   map to guest = Never
   null passwords = Yes
   obey pam restrictions = No
   password server = *
   smb passwd file = /usr/local/etc/samba/smbpasswd
   private dir = /usr/local/etc/samba
   passdb backend = ldapsam:ldap://127.0.0.1/
   algorithmic rid base = 1000
   guest account = nobody
   enable privileges = Yes
   pam password change = No
   passwd chat = *new*password* %n\n *new*password* %n\n *changed*
   passwd chat debug = No
   passwd chat timeout = 2
   check password script =
   password level = 0
   username level = 0
   unix password sync = No
   restrict anonymous = 0
   lanman auth = Yes
   ntlm auth = Yes
   client NTLMv2 auth = No
   client lanman auth = Yes
   client plaintext auth = Yes
   use kerberos keytab = No
   log level = 2
   syslog = 0
   syslog only = No
   log file = /var/log/samba/log.%m
   max log size = 10
   debug timestamp = Yes
   debug prefix timestamp = No
   debug hires timestamp = No
   debug pid = No
   debug uid = No
   enable core files = Yes
   smb ports = 445 139
   large readwrite = Yes
   max protocol = NT1
   min protocol = CORE
   read bmpx = No
   read raw = Yes
   write raw = Yes
   disable netbios = No
   reset on zero vc = No
   acl compatibility = auto
   defer sharing violations = Yes
   nt pipe support = Yes
   nt status support = Yes
   announce version = 4.9
   announce as = NT
   max mux = 50
   max xmit = 16644
   name resolve order = wins bcast dns host
   max ttl = 259200
   max wins ttl = 518400
   min wins ttl = 21600
   time server = Yes
   unix extensions = Yes
   use spnego = Yes
   client signing = auto
   server signing = No
   client use spnego = Yes
   enable asu support = No
   deadtime = 0
   getwd cache = Yes
   keepalive = 300
   lpq cache time = 30
   max smbd processes = 0
   paranoid server security = Yes
   max disk size = 0
   max open files = 500
   open files database hash size = 10007
   socket options = SO_KEEPALIVE SO_BROADCAST TCP_NODELAY 
SO_SNDBUF=16384 SO_RCVBUF=16384 IPTOS_LOWDELAY

   use mmap = Yes
   hostname lookups = No
   name cache timeout = 660
   load printers = No
   printcap cache time = 750
   disable spoolss = No
   show add printer wizard = Yes
   mangling method = hash2
   mangle prefix = 1
   max stat cache size = 1024
   stat cache = Yes
   machine password timeout = 604800
   add user script = /usr/local/sbin/smbldap-useradd -m %u
   delete user script = /usr/local/sbin/smbldap-userdel %u
   add group script = /usr/local/sbin/smbldap-groupadd -p %g
   delete group script = /usr/local/sbin/smbldap-groupdel %g
   add user to group script = /usr/local/sbin/smbldap-groupmod -m %u %g
   delete user from group script = /usr/local/sbin/smbldap-groupmod -x 
%u %g

   set primary group script = /usr/local/sbin/smbldap-usermod -g %g %u
   add machine script = /usr/local/sbin/smbldap-useradd -w %u
   

[Samba] Re: oplock not working correctly

2007-08-13 Thread vwdragon

Hello..

I've the same problem...
dou you get solution?

Iain:

I posted a problem with oplock previously, but am guessing it goto lost
in an earlier thread with the same subject line, so here goes another shot:

Using Samba 3.0.22 on a Gentoo box (kernel 2.6.15) I've a situation
where file locking does not seem to be functioning as expected, in that
more than one user can open and write to a file without any
notifications being displayed about the file already being opened by
another user.

In the debug output below I have two Windows XP clients accessing the
same shared file, neteng02 has the file open. neteng-vm3 then opens the
same file, receiving no warnings about the file being open by another
user. File is modified by neteng02 and saved and remains open. File then
modified by neteng-vm3 and saved. File closed and opened by neteng02 who
sees only modifications made by neteng-vm3.

*** START ***
log.neteng-vm3:[2006/04/26 11:33:57, 3]
smbd/oplock_linux.c:linux_set_kernel_oplock(166)
log.neteng-vm3:  linux_set_kernel_oplock: got kernel oplock on file
tmp/my_test_file.txt, dev = 804, inode = 251750772, file_id = 225
log.neteng-vm3:[2006/04/26 11:33:57, 5] smbd/oplock.c:set_file_oplock(125)
log.neteng-vm3:  set_file_oplock: granted oplock on file
tmp/my_test_file.txt, dev = 804, inode = 251750772, file_id = 225,tv_sec
= 444f3e85, tv_usec = 88676
log.neteng-vm3:[2006/04/26 11:33:57, 3]
smbd/oplock.c:initial_break_processing(311)
log.neteng-vm3:  Current oplocks_open (exclusive = 0, levelII = 1)
log.neteng02:[2006/04/26 11:33:57, 3]
smbd/oplock.c:initial_break_processing(311)
log.neteng02:  Current oplocks_open (exclusive = 1, levelII = 0)
log.neteng02:[2006/04/26 11:33:53, 3]
smbd/oplock_linux.c:linux_set_kernel_oplock(166)
log.neteng02:  linux_set_kernel_oplock: got kernel oplock on file
tmp/my_test_file.txt, dev = 804, inode = 251750772, file_id = 458
log.neteng02:[2006/04/26 11:33:53, 5] smbd/oplock.c:set_file_oplock(125)
log.neteng02:  set_file_oplock: granted oplock on file
tmp/my_test_file.txt, dev = 804, inode = 251750772, file_id = 458,tv_sec
= 444f3e81, tv_usec = d7ef7
*** END ***

My smb/conf file looks like:

*** START ***
[global]
  netbios name  = NETMON2
  workgroup = MYCORP
  server string = LDAP PDC
  hosts allow   = 172.16.0.0/19

  security = user
  encrypt passwords = yes
  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  interfaces = lo eth0
  bind interfaces only = yes
  local master = yes
  os level = 65
  domain master = yes
  domain logons = yes
  preferred master = yes
  null passwords = no
  hide unreadable = yes
  hide dot files = yes
  logon script = %U.bat
  logon drive = H:
  logon home = \\%L\%U
  wins support = yes

  name resolve order = wins lmhosts host bcast
  dns proxy = yes
  time server = yes

  log file = /var/log/samba/log.%m
  max log size = 50
  log level = 5

  add user script = /usr/sbin/smbldap-useradd -m %u
  add machine script = /usr/sbin/smbldap-useradd -w %u
  add group script = /usr/sbin/smbldap-groupadd -p %g
  add user to group script = /usr/sbin/smbldap-groupmod -m %u %g
  delete user from group script = /usr/sbin/smbldap-groupmod -x %u %g
  set primary group script = /usr/sbin/smbldap-usermod -g %g %u

  passdb backend = ldapsam:ldap://127.0.0.1/

  ldap delete dn = Yes
  ldap ssl = no
  ldap suffix = dc=waldocorp,dc=com
  ldap admin dn = cn=Manager,dc=waldocorp,dc=com
  ldap group suffix = ou=Groups
  ldap user suffix = ou=Users
  ldap machine suffix = ou=Computers
  ldap idmap suffix = ou=Users

  printcap name = cups
  load printers = yes
  printing = cups

  admin users = @Domain Admins

  kernel oplocks = yes
  oplocks = yes
  level2 oplocks = yes
  strict locking = yes

[printers]
  comment = All Printers
  path = /var/spool/samba
  browseable = yes
  guest ok = yes
  writable = no
  printable = yes
  create mode = 0700
  default devmode = yes

[print$]
  comment = Printer Driver Download Area
  path = /home/samba/printers
  browseable = yes
  read only = yes
  write list = @Domain Admins
  guest ok = yes

[netlogon]
  path = /home/samba/netlogon
  guest ok = yes
  browseable = no
  write list = root

[profiles]
  path = /home/samba/profiles
  writeable = yes
  browseable = no
  read only = no
  create mode = 0644
  directory mode = 0755
  guest ok = yes

[homes]
  path = /home/samba/users/%U
  browseable = no
  valid users = %S
  read only = no
  create mask = 0664
  directory mask = 0775

[software]
  comment = Software Repository
  path = /home/samba/software
  guest ok = no
  public = yes
  read only = no
  browseable = yes
  force create mode = 0775
  force directory mode = 6775

[engineering]
  comment = Network Engineering Group Share
  path = /home/samba/groups/engineering
  guest ok = no
  public = yes
  read only = no
  browseable = yes
  force create mode = 0775
  force directory mode = 6775

[finance]
  comment = Finance Group Share
  path = /home/samba/groups/finance
  guest ok = no
  public = yes
  read only = no
 

[Samba] Re: oplock not working correctly

2007-08-13 Thread vwdragon



Are these files MS office files? I ask that because of the way MS
opens files that it never writes to the file that it opens. It instead
creates a new file and writes to the new then deletes the old and
renames the new to the old. Although having said that I am not sure
how Office tells a file is in use...

John


These files are OpenOffice...
When I use opiton force user = root in smb.conf then it's work ok..
Oplock working... But everyone working as root :(

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba