Re: [Samba] Samba 3 and MMC (Microsoft Management Console)

2003-11-06 Thread Jeremy Allison
On Thu, Nov 06, 2003 at 10:34:35PM +, John H Terpstra wrote:
 
 You can NOT use the Computer Management MMC to manage a Sambae server.

Are you sure about that ? I used it during Samba 3 development
and definately parts of it worked.

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


Re: [Samba] Outlook + attached files

2003-11-07 Thread Jeremy Allison
On Fri, Nov 07, 2003 at 10:33:49AM -0600, Chris Jones wrote:
 Problem only started occuring when their files got moved onto the new samba
 fileserver and its not just effecting one user but all that are on the new
 server. People still on old windows fileserver are uneffected. 

What exactly is the difference in behaviour in between the
Samba served outlook and the Windows served one. I'm trying
to understand the problem here.

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


Re: [Samba] winbindd panic daemon dies

2003-11-10 Thread Jeremy Allison
On Mon, Nov 10, 2003 at 05:36:38PM -, ww m-pubsyssamba wrote:
 Hi All,
 
   can anyone make any sense of the error below, please advise if I need to log 
 this as a bug but I'm not sure how to further diagnose what is happening. This is 
 from my winbindd log file,

Yes it's a bug. What would really help is a stack backtrace
from a winbindd compiled with -g stuck on a panic action (see
the smb.conf manpage for this parameter).

Thanks,

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


Re: [Samba] Test Samba 3.0.1pre2 smb panic xp client

2003-11-10 Thread Jeremy Allison
On Mon, Nov 10, 2003 at 02:55:08PM +0100, jean-marc pouchoulon wrote:
 Hi ,
 I've just tried Samba 3.0.1pre2 on redhat 9 with xpclient.
 I can connect ( very slow ) but I have :
 [2003/11/10 14:37:51, 0] lib/util.c:smb_panic(1400)
   PANIC: init_unistr2_from_datablob: malloc fail

Can you reproduce this ? Can you log a bug with a stack
backtrace (with the smbd compiled with -g) so we  can
see why the crash is occurring ?

Thanks,

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


Re: [Samba] Caracteres ñ á é ó ú en archives names not are reading

2003-11-17 Thread Jeremy Allison
On Mon, Nov 17, 2003 at 03:26:07PM -0500, Ed Holden wrote:
 A translation, for anyone who knows the answer ...
 
 
 We've migrated from Samba 2.x to version 3 and have a problem wherein 
 Windows clients can't see files that contain the characters ñ, á, é, í, 
 ó, or ú.  This is a serious problem because we have a lot of files 
 containing these letters.
 
 Is there any way to solve this?

To get the same character set compatibility set use:

unix charset = ISO8859-1
dos charset = CP850

in the [global] section of your smb.conf.

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


Re: [Samba] WINS Replication

2003-11-18 Thread Jeremy Allison
On Tue, Nov 18, 2003 at 09:24:29AM -0500, Adam Williams wrote:
  Just wondering about the current status of wrepld.  Back in '02 Jean
  François Micouleau was doing some work on it, but there does not appear to
  be any changes to the code since that spring besides updates to the entire
  tree that happen to touch the wrepld files.  The Samba-HOWTO states that it
  is in active development and I was wondering if I could help with testing
  or something.  I'm excited about this tool, and it would be sweet to have
  it in a working state.  Who should I talk to about this?
 
 This question was just asked yesterday.  It is not complete, has a low
 priority, and there is no time line.  It is overshadowed by other
 issues in the 3.0.x release(s).

But if you're interested in fixing it - please feel free to submit patches !

Thanks,

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


Re: [Samba] Samba opens many files.

2003-11-18 Thread Jeremy Allison
On Tue, Nov 18, 2003 at 04:26:19PM +0100, Markus Wenke wrote:
 Hi,
 
 I have a dir with more than 16000 files in it.
 If I klick with MS-Explorer on this Dir to see which files are in it,
 smbd opens every file and so it takes some seconds to show this Dir!
 (and CPU usage is at 100%).
 
 the logfile says smbd do this for every file:
 
 [2003/11/18 16:06:58, 2] smbd/open.c:open_file(246)
  USERX opened file /path/to/file.txt  read=Yes write=No (numopen=1)
 
 
 Is this behavior normal?

Yes. Explorer is reading each file for thumbnail etc. info.

 Can I avoid this with conf-settings?

No. Don't have a directory with more than 16000 files. That's a
silly way to organise things.

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


Re: [Samba] File Disappearance after copy from OS X

2003-11-18 Thread Jeremy Allison
On Tue, Nov 18, 2003 at 11:45:38AM -0500, Ed Holden wrote:
 Hi,
 
 I wrote in last week about a problem with Mac OS X systems copying files 
 to a Samba server.  The files sometimes disappear, though the problem is 
 intermittent.  I suspect that this is an issue with Mac OS X dropping 
 the file prematurely, and indeed a Google search reveals that OS X users 
 have seen similar problems, but only with Samba shares.

Have you reported this to Apple ? Conrad is very good about
following up with such things.

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


Re: [Samba] Failing Authentication

2003-11-18 Thread Jeremy Allison
On Tue, Nov 18, 2003 at 12:03:53PM -0600, Jerry Haltom wrote:
 I am running Samba on a box serving a network of 30 clients, and 2 MS
 SQL 2000 servers. The SQL servers are members of the domain, and use NT
 authentication for connections and such.
 
 For the most part, this works fine.
 
 However, it seems that every now and then, pretty randomlly, NT
 authentication is failing for these services. Errors returned are pretty
 typical of DC-not-working problems:
 
 Login failed for user '(null)'. Reason: Not associated with a trusted
 SQL Server connection.
 (Source: GREG (Data source); Error number: 18452)
 ---

More info please. Is Samba a PDC ? Can you get a debug level 10 or an
ethereal trace of the SQL server authentication failures ?

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


Re: [Samba] SAMBA3.0.0pre3

2003-11-18 Thread Jeremy Allison
On Tue, Nov 18, 2003 at 07:18:34PM +0100, [EMAIL PROTECTED] wrote:
 Hi Jerry et al,
 
 I tried the pre3 version and it seemed at the first look that the problems
 of setting security properties is solved. Though I was unable to really
 test it because the server ran into some different problems which made him
 very slow:
 
   zitpcx3669 (131.169.214.120) closed connection to service print$
 [2003/11/18 13:43:43, 1] smbd/service.c:make_connection_snum(705)
   zitpcx3669 (131.169.214.120) connect to service testp9 initially as user
 nobody (uid=60001, gid=60001) (pid 13849)
 [2003/11/18 13:43:44, 1] smbd/service.c:make_connection_snum(705)
   zitpcx3669 (131.169.214.120) connect to service print$ initially as user
 nobody (uid=60001, gid=60001) (pid 13849)
 [2003/11/18 13:44:43, 0] lib/fault.c:fault_report(36)
   ===

Can you get a stack backtrace using the panic action smb.conf option please.

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


Re: [Samba] Failing Authentication

2003-11-18 Thread Jeremy Allison
On Tue, Nov 18, 2003 at 12:50:21PM -0600, Jerry Haltom wrote:
 Sambe 3.0 is the PDC. No, I can't get any info. The Server is serving a
 LOT of people. And the authentiction failures are extremely random... as
 in maybe 3 a day. Debug level 10 is way to slow to turn on.
 
 Let me just ask this for clarity. The fact that it is SQL server has
 nothing to do with it, right? It uses Windows Authentication, weither
 that be through a Win32 API or whatever, just like every other program.
 Same APIs.

Yes, it should be the same.

 Is there a specific debug level for a specific thing I can enable? 3.0
 has better debug support now, but I haven't figured out how to use
 it...?

It should be possible to just up the debug on authentication, but
I'm not sure we implemented that yet. I'll look into it.

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


Re: [Samba] Samba opens many files.

2003-11-18 Thread Jeremy Allison
On Tue, Nov 18, 2003 at 05:42:16PM -0800, Eric Roseme wrote:
 I agree that it's a silly way to organize things, but there are many CAD 
 customers serving legacy NFS design environments that are experiencing 
 this issue daily.  This single problem will cause more migrations from 
 Samba to Windows that any other I have seen - at least for big iron.  I 
 have been trying to find ways to mitigate the effect - and certainly 
 turning off mangling helps (I have seen VERYlongFILEname1234.PARTname - 
 and 12,000 of these).  Also setting case sensitive = yes helps a 
 little bit.  But we can't get past doing what appears to be multiple 
 stats for each object.  Any creative suggestions are welcome.

Fix the filesystem so that large directories are efficient.
XFS is better in this respect I believe. Don't give me these
doomsday scenarios, if the customers think Windows does this
better, good luck to them there's nothing Samba can do in this
respect. We have to stat/read the file as it's what explorer
is asking for. Just tell them to keep their anti-virus software
up to date.

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


Re: [Samba] help with charsets

2003-11-19 Thread Jeremy Allison
On Wed, Nov 19, 2003 at 07:13:10AM -0500, Preston wrote:
 El Miércoles, 19 de Noviembre de 2003 06:55 AM, Bjoern JACKE escribió:
  On 2003-11-18 at 07:52 -0500 Roger D. Vargas sent off:
  I need urgent help with a charset problem. After upgrading to samba 3 my
   users can use files with spanish characters (á ñ). The name is truncated
   at the first strange character and the rest of the name is replaced by
   _. Users cant access the file or rename it.
  After digging the docs I found that I must specify the correct dos
   charset. Can somebody tell me the carset name to enable this characters?
 
  more important might be unix charset. Try cp850 if you did not have
  character set set in samba 2.x. Better is renaming all files to
  utf-8 with convmv and leave the unix charset default which is
  utf-8.
 REnaming? There are hundreds of files.

Use find. man 1 find.

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


Re: [Samba] extremely high %CPU and TIME

2003-11-19 Thread Jeremy Allison
On Wed, Nov 19, 2003 at 03:14:02PM -0500, Tom Ryan wrote:
 I've kept looking for an answer to this to no avail.. any ideas?
 
 strace -p  reveals
 
 fcntl64(14, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=684, len=1}, 
 0xb180) = 0
 fcntl64(14, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=684, len=1}, 
 0xb150) = 0

Ok, it's in a tdb call. Can you attach with gdb and get a stack backtrace ?

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


Re: [Samba] extremely high %CPU and TIME

2003-11-19 Thread Jeremy Allison
On Wed, Nov 19, 2003 at 03:23:31PM -0500, Tom Ryan wrote:
 Jeremy,
 
 (gdb) bt
 #0  0x08173176 in tdb_brlock ()
 #1  0x0817349a in tdb_unlock ()
 #2  0x0817517a in tdb_next_lock ()
 #3  0x081752a6 in tdb_traverse ()
 #4  0x08179de4 in print_queue_status ()
 #5  0x0807a6de in api_DosPrintQGetInfo ()
 #6  0x0807fdd8 in api_reply ()
 #7  0x08077e03 in reply_trans ()
 #8  0x080af1af in switch_message ()
 #9  0x080af3a9 in construct_reply ()
 #10 0x080af528 in process_smb ()
 #11 0x080b01b4 in smbd_process ()
 #12 0x0806ab4b in main ()
 #13 0x420158f7 in __libc_start_main () from /lib/i686/libc.so.6
 (gdb) 

Ok, this is a Win9x client scanning for print jobs. Up the
lpq cache time I would suggest. What Samba version ?

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


Re: [Samba] extremely high %CPU and TIME

2003-11-19 Thread Jeremy Allison
On Wed, Nov 19, 2003 at 03:36:15PM -0500, Tom Ryan wrote:
 2.2.7 on redhat 8. i uped lpq cache time = 60. doesn't seem to help.

How many print jobs do you have on this box ? Hmmm. As I recall,
a Win9x client with an open print monitor will just continually
scan the server - pounding it with requests. 

We redesigned this for 3.0.x (try 3.0.1pre3) but it won't fix
the problem that Win9x clients will continuously scan the print
server - this is a problem of the Win9x design, not of Samba.
The same thing happens to WinNT/2k/2k3.

Can you get people to close down the print monitors ?

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


Re: [Samba] Fwd: Samba semantics error?

2003-11-19 Thread Jeremy Allison
On Mon, Nov 10, 2003 at 03:49:30PM -0800, Mike Fedyk wrote:
 On Sun, Nov 09, 2003 at 12:02:21PM +1100, Andrew Bartlett wrote:
  Under windows, I don't think you can delete a 'read only' file.
  
  Samba takes the missing 'w' for any user as meaning a read-only file.
 
 I most certainly can.
 
 I just tried it against a NT4 server, and locally, and it worked perfectly.
 
 Create temp file, mark read only, delete.  Successful.  Even against samba
 3.0.0 the file is deletable.

This is not correct. On my W2K box :

c:\ echo ro
c:\ attrib +r ro
c:\ del ro
c:\ro
Access is denied.

I don't know how you're doing this but it isn't via the command line.
The GUI may be doing something different (implicitly removing the R attribute).

Please explain the exact semantics you think we should have, and what
you're not getting.

Thanks,

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


Re: [Samba] extremely high %CPU and TIME

2003-11-19 Thread Jeremy Allison
On Wed, Nov 19, 2003 at 03:42:11PM -0500, Tom Ryan wrote:
 Jeremy,
 
 All clients are windows xp.

Ok, then you're not using the spoolss pipe code on the Samba
server, as this scanning behaviour goes away once WNT or above
clients can open the SPOOLSS pipe (they use a strange form of
change notify instead of scanning).

Do you have disable spoolss set in your smb.conf ?

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


Re: [Samba] extremely high %CPU and TIME

2003-11-19 Thread Jeremy Allison
On Wed, Nov 19, 2003 at 03:57:56PM -0500, Tom Ryan wrote:
 yes.. but I was having problems before with that enabled previously.

The client behaviour changes once spoolss is enabled. If you're 
claiming to see the same issue on the clients you need to restart
the spooler service on them in order for them to notice the now
open spoolss pipe.

3.0.x has a *much* improved version of the printing code we use
on the HP PSA (Print Server Appliance), so I can definately
recommend it.

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


Re: [Samba] BIG problem with the filesharing

2003-11-19 Thread Jeremy Allison
On Wed, Nov 19, 2003 at 10:43:46PM +0100, Niko wrote:
 When copying files or browsing files it seems like samba or my Win2kpro machine is 
 losing the connection between each other.
 Gets an error message on my windows machine but when i try to browse the samba 
 machine directly after there is no problem doing that at all.
 Never had this problem with Samba 2.x but with 3.0 it occured. 
 
 [2003/07/05 00:13:25, 0] lib/util_sock.c:read_data(436)
   read_data: read failure for 4. Error = Connection reset by peer
 [2003/07/05 01:57:55, 0] lib/util_sock.c:read_data(436)
   read_data: read failure for 4. Error = No route to host
 
 
 
   ===
 [2003/11/18 19:46:15, 0] lib/fault.c:fault_report(37)
   INTERNAL ERROR: Signal 11 in pid 32640 (3.0.0)
   Please read the appendix Bugs of the Samba HOWTO collection
 [2003/11/18 19:46:15, 0] lib/fault.c:fault_report(39)
   ===
 [2003/11/18 19:46:15, 0] lib/util.c:smb_panic(1400)
   PANIC: internal error
 [2003/11/18 19:46:15, 0] lib/util.c:smb_panic(1407)
   BACKTRACE: 20 stack frames:
#0 ./smbd(smb_panic+0xfc) [0x818076c]
#1 ./smbd [0x817203f]
#2 /lib/tls/libc.so.6 [0x420277b8]
#3 /lib/tls/libc.so.6(malloc+0x8d) [0x4207378d]
#4 ./smbd(talloc+0x40) [0x818455c]
#5 ./smbd(talloc_memdup+0x14) [0x8184738]
#6 ./smbd(talloc_strdup+0x25) [0x818477d]
#7 ./smbd(strftime+0x17d9) [0x8076a05]
#8 ./smbd(mangle_map_filename+0x12) [0x80bec0a]
#9 ./smbd(mangle_map+0x56) [0x80bd87e]
#10 ./smbd [0x80a1587]
#11 ./smbd [0x80a1ccd]
#12 ./smbd(reply_trans2+0x5d5) [0x80a7bb9]
#13 ./smbd [0x80b81dd]
#14 ./smbd [0x80b833d]
#15 ./smbd(process_smb+0x76) [0x80b8502]
#16 ./smbd(smbd_process+0x150) [0x80b8fc8]
#17 ./smbd(main+0x414) [0x81d4544]
#18 /lib/tls/libc.so.6(__libc_start_main+0xe4) [0x42015704]
#19 ./smbd(chroot+0x31) [0x8075f2d]

Do you have a mangled map set in your smb.conf ? Is so,
can you post the smb.conf please ? A stack backtrace with
line numbers would also help.

Thanks,

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


Re: [Samba] Samba 3.x and NT4 update- hardware related

2003-11-19 Thread Jeremy Allison
On Wed, Nov 19, 2003 at 04:52:19PM -0500, Don Bivens wrote:
 Big Kudos to the Samba team, an update, and hope that my experience will 
 help others...
 
 I posted here last week, experiencing problems related to NT 
 authentication using Winbind and Samba 3 after upgrading disk drives and 
 from Samba 2.
 
 It ended up being an el cheapo Netgear switch interacting with an el 
 cheapo Linksys broadband router/switch and when the server was plugged 
 into one and clients into the other.  When I plugged everything into a 
 new Linksys switch it worked like a champ!

Thanks for posting this. I've lot count of the number of so called oplock
problems that went away when people buy decent networking gear :-) :-).

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


Re: [Samba] What is vuid?

2003-11-20 Thread Jeremy Allison
On Thu, Nov 20, 2003 at 01:05:34PM -0500, Jeff Gardiner wrote:
 I'm getting the following errors in my error logs:
 
 ERROR! vuid 100 did not map to a valid vuser struct!
 
 At the time this error was being created I was trying to add a domain user as 
 a local admin.  I was trying to get the browse list of domain users up, but 
 being denied.

Please send in a debug level 10 log if you can reproduce this.
Thanks !

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


Re: [Samba] how legal is samba

2003-11-20 Thread Jeremy Allison
On Thu, Nov 20, 2003 at 11:18:13AM -0800, Jason Adams wrote:
 With all this DMCA crud, is samba a target for a IP case from MS

Short answer. No.

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


Re: [Samba] Fwd: Samba semantics error?

2003-11-21 Thread Jeremy Allison
On Thu, Nov 20, 2003 at 10:01:32PM -0800, Mike Fedyk wrote:
 
 But if I go into windows explorer I can delete the file even though it's
 marked read-only.

It's implicitly removing the RO attribute before the delete.

 You can also remove the read-only attrib in windows servers, but not on
 samba servers (unless you have write access which negates the entire
 purpose...).
 
 Here's what I want:
 
 make files read-only, make directories writable (for user and group only)
 can't modify files, must move or delete.
 
 Here's what I get:
 I can move or delete read-only files to my heart's content as long as I own
 the files.  If I don't, then nada.  No moving or deleting.

I still don't get exactly what you want I'm afraid. Currently we're
implementing POSIX semantics where delete/rename belongs to the directory, not
the file.

The parameters dos filemode and dos filetimes provide some semblance
of the DOS semantics.

I'm still unclear on exactly what doesn't work for you. Can you give
me an exact example ?

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


Re: [Samba] password chat program timeout

2003-11-24 Thread Jeremy Allison
On Sun, Nov 23, 2003 at 07:51:19PM +0100, Georg Lutz wrote:
 Hi,
 
 after some investigation, I found out why my users always get an error
 back when they try to change their passwords on win2k.
 
 unix password sync option is enabled and passwords are synchronised via
 passwd chat. All acounts are stored in ldap.
 
 With the value of 2000 ms in smbd/chgpasswd.c(function expect) I always
 got timeout messages in the logs. The reason for the timeout seems to be
 the relative long ldap-lookup. However with a value of 5000 ms it works,
 users can change their (unix-)passwords over samba.
 
 Is there a chance to have a default value of 5000 ms or even longer in
 the next release?

I've parameterised this (in seconds) for the next release. Thanks for
the feature request.

New parameter will be passwd chat timeout (default 2 seconds).

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


Re: [Samba] W98 can't get large list of users from Samba 3.0.0 PDC

2003-11-25 Thread Jeremy Allison
On Tue, Nov 25, 2003 at 07:16:37PM +0300, Nick Slobodsky wrote:
 I have installed the Samba 3.0.0 as PDC. If number of users is small (about 
 15) it works fine, but when it grows and the whole list of users or groups
 doesn't fit in one RPC buffer, Win98 servers can't get it and unable to set
 user level security.
 User manager for domains from NT server can get and modify the users.
 Is this bug or bad config?

It's a bug - fixed in the latest Samba 3.0.1pre release.
Sorry for the problem.

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


Re: [Samba] NT account locking out

2003-11-26 Thread Jeremy Allison
On Wed, Nov 26, 2003 at 12:52:54PM -0800, [EMAIL PROTECTED] wrote:
 Hi
 
 I have Win2k servers connecting to the samba server by mapping a windows 
 user to unix user.
 
 We never had any problems with thsi connectivity but for past 2 weeks we 
 have an erratic problem which causes the windows account to lock thus 
 making samba unfunctional. When I get the windows account unlocked then 
 samba starts functioning properly again.
 
 I do not have a scenario to reproduce the problem and it appears once in 2 
 days or sometimes thrice in a day. This architecture was working for past 
 2 years without problems.

What version of Samba, what platform are you running it on ? We need
these basics to be able to even start to help I'm afraid.

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


Re: [Samba] Error Message

2003-11-26 Thread Jeremy Allison
On Thu, Nov 27, 2003 at 09:58:31AM +1030, Martin Stacey wrote:
 I noticed this error message within some of my users log files;
 
 rpc_server/srv_samr_nt.c:_samr_query_aliasmem(2626) _samr_query_aliasmem:
 Not yet implemented.
 
 Why does this mean and what do I need to do to stop this error message from
 appearing.

This is an RPC call not implemented in Samba 2.2.x but now implemented
in Samba 3.0. You don't say what your version of Samba is (which should
really be a pre-requisite for a bug report) but I'm assuming 2.2.x. This
will dissapear if you upgrade to 3.0.x.

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


Re: [Samba] samba 3.0 doesn't lock Word files!!

2003-11-27 Thread Jeremy Allison
On Thu, Nov 27, 2003 at 05:44:24PM +0200, Vladuta Cristian wrote:
 
 Dear All ,
 I am re-posting after a couple of weeks the following issue related to
 MS Word and Samba 3.0 hoping that this time somebody could help me
 unlock the mystery.  I have installed Samba 3.0 rpm on RH 9 and cannot
 get past an elementary file lock issue such as opening a file through MS
 WORD by multiple users from different MS workstations (w2k, XP,W98, etc)
 in concurrent sessions. Nobody gets that sort of warning..test.doc
 is already open by ...Do you want to make a copy? . I tried every
 lock/oplocks feature, still with no positive results (starting from
 default settings, obviously).

This could be a bug we've fixed for 3.0.1. Can you try this with the
latest pre-release ?

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


Re: [Samba] fcntl lock failed at large offset: pretty urgent

2003-12-02 Thread Jeremy Allison
On Tue, Dec 02, 2003 at 07:47:50PM +1100, Jim Thomas wrote:
 Debian Woody with security updates
 Linux kernel 2.2.25
 Samba 3.0.0
 libc6 2.2.5
 
 The problem I have is with a windows application that uses samba.  This
 application is crucial for the organization, so if this is not fixed,
 and soon, we will have to ditch Samba and move to a windows server.
 I *really* don't want to do this, as Samba has been working so well for
 years now and billg is rich enough already.
 
 I am having problems with a windows client program that does a range
 lock on a file on a share.  The log.smbd reports with debug level 3:
 
 [2003/12/02 17:20:23, 3] lib/util.c:fcntl_lock(1632)
   fcntl_lock: fcntl lock gave errno 75 (Value too large for defined data type)
 [2003/12/02 17:20:23, 3] lib/util.c:fcntl_lock(1651)
   fcntl_lock: lock failed at offset 4294967284 count 1 op 13 type 1 (Value too large 
 for defined data type)
 [2003/12/02 17:20:23, 3] smbd/error.c:error_packet(94)
   error string = Value too large for defined data type
 
 What I think is happening is the client is passing a number
 greater than 2^31 as the lock range, which will fail according to
 http://samba.org/samba/docs/man/locking.html#id2918968 which states
 that samba locks from 0-2^31, whereas windows issues lock requests up
 to 2^32 or 2^64.
 
 Setting locking = no fixes the problem, but will cause others as these
 files are used by many people at once.

If Samba is configured to use 64 bit filesystems it assumes it
can lock from 0 to 2^63-1 - the code in locking/posix.c in posix_fcntl_lock()
takes care of this. If it is configured to use 32 bit filesystems
it assumes it can lock from 0 to 2^31-1.

Samba will truncate the posix lock above these limits as no posix
application will ever see such a lock. You might get this problem
if you're running a 64-bit Samba gatewaying onto a 32-bit mounted
NFS mount, or other mounted partition.

Can you give more details about the setup please ? This code has been
stable and working for quite a long time now.

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


Re: [Samba] fcntl lock failed at large offset: pretty urgent

2003-12-02 Thread Jeremy Allison
On Wed, Dec 03, 2003 at 01:29:55PM +1100, Jim Thomas wrote:
 
 More info of setup: 
 The version of Samba I have is a precompiled Debian package, and
 downloaded from the site referred to by www.samba.org
 
 http://samba.mirror.aarnet.edu.au/samba/ftp/Binary_Packages/Debian/samba3/dists/stable/main/binary-i386
 
 I'm not sure what the build options were for this, but I will try and
 find out.

Running smbd -d10 will cause smbd to write build info into log.smb

 When you say Samba can be configured to use 64 bit filesystems, is this
 a compile time option?  Is there a way of checking if the version I have
 has this enabled?  Perhaps I should build from source.

It's checked for at compile time. You need to be looking for 
something like HAVE_STRUCT_FLOCK64 which is what we use for
64 bit locking.

 The setup is:
   Linux samba 3.0.0 server, serving files from local disk
   Win95,98,xp-pro clients mounting smb shares as a workgroup
   Windows software that wants to set a lock at 2^32-16

What filesystem on the local disk ? Do you have a debug level 10
of the problem ? Have you tried any of the 3.0.1pre releases
(although I don't remember changes in this area).

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


Re: [Samba] Single File Delete/Directory Listing on Windows ME

2003-12-07 Thread Jeremy Allison
On Sat, Dec 06, 2003 at 03:35:52PM -0800, Brett Johnson wrote:
 
 General failure reading drive G
 Abort, Retry, Fail.
 
 The directory contains the file, and the file shows up in a full listing,
 but I can't do a listing of a single file. Also affects the del command.  I
 can delete any number of files using wildcards, but I can't delete just one
 file.  From Explorer, I can delete a single file, but not from the command
 prompt.
 
 It works fine on my Windows 2000 stations.  I've tried 3 different Fedora
 Servers running Samba 3.0015 and many different Windows ME stations, and
 they all have the same problem.  Servers running Redhat 9 and older Samba
 versions appear to work fine.  I've tried everything I can think of in the
 samba config files and nothing seems to work.  Any help will be greatly
 appreciated.

Is this the 3.0.0 release version of Samba ? If so this is a bug I
fixed for 3.0.1. Please download and try the Samba 3.0.1rc1 that Jerry
released recently.

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


Re: [Samba] Win98 User List Problem

2003-12-08 Thread Jeremy Allison
On Mon, Dec 08, 2003 at 04:10:50PM -0200, Fabricio Adorno wrote:
 Hi all,
 
 I'm trying to list users using user level share in windows 98, but I 
 always get the folowing message:
 
 
 [2003/12/08 13:46:51, 1] smbd/ipc.c:api_fd_reply(284)
   api_fd_reply: INVALID PIPE HANDLE: 0
 [2003/12/08 13:46:51, 2] rpc_server/srv_samr_nt.c:_samr_lookup_domain(2540)
   Returning domain sid for domain XX- 
 S-1-5-21-1305940498-1192644665-829235722
 [2003/12/08 13:46:52, 1] smbd/ipc.c:api_fd_reply(284)
   api_fd_reply: INVALID PIPE HANDLE: 0
 [2003/12/08 13:46:52, 1] smbd/ipc.c:api_fd_reply(284)
   api_fd_reply: INVALID PIPE HANDLE: 0
 
 
 I have looked for an answer in samba-ntdom archives, but I couldn't find it.
 What's the problem?
 
 
 I'm using samba-3.0.0.

It's an erroneous error message. There were 2 bugs w.r.t. this problem,
I think both are fixed for Samba 3.0.1. Please try the latest release
candidate, this should fix the bug.

Thanks,

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


Re: [Samba] Samba NTFS permissions

2003-12-08 Thread Jeremy Allison
On Mon, Dec 08, 2003 at 09:12:44AM -0600, Hunsberger, Mike wrote:
 Hi, I am new to this list.
 
 Does samba 3 support ntfs permissions or a way to map them?
 Creating a share for a user is easy but can you set different file
 permissions in that share with separate ntfs permissions to give different
 users permission to different areas of the share? This is on an Active
 Directory network. Thank you.

You need to be using a Linux kernel with POSIX ACL support
compiled in, and a Samba compiled similarly.

This will allow you to do what you need.

 PS: We are trying to save the state of Wisconsin some money by replacing our
 Win 2000 file servers with samba servers!

Think of the taxpayers ! Convert the desktops to Linux also,
then you won't need the Samba servers :-).

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


Re: [Samba] Machine password change failed: stub received bad data

2003-12-08 Thread Jeremy Allison
On Mon, Dec 08, 2003 at 01:00:02PM -0600, Jerry Haltom wrote:
 One of our workstations spit out the following error:
 
 Could not change machine account password: the stub received bad data.
 
 This sounds to me like a Samba problem... but it's a bit beyond me to
 come up with an answer to. Any ideas where I should start?

Can you reproduce this problem ? If so, can you send in a 
debug level 10 log please ?

Thanks,

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


Re: [Samba] Machine password change failed: stub received bad data

2003-12-08 Thread Jeremy Allison
On Mon, Dec 08, 2003 at 02:45:00PM -0600, Jerry Haltom wrote:
 No, I cannot reproduce the problem. I do not know when or how Windows
 decides to change machine passwords. I also cannot leave a debug level
 that high on all the time.

Ok, thanks. Hmmm. It's going to be very hard to determine what
exactly the problem is without a test case. I'll think about
exactly how I might generate one (maybe changing the Windows
client clock might cause this to reproduce). What exactly is
the client OS type and Samba server version ?

Thanks,

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


Re: [Samba] NT User ID with apostrophe

2003-12-08 Thread Jeremy Allison
On Mon, Dec 08, 2003 at 12:47:28PM -0500, Hall, Ken (IDS ECCS) wrote:
 I have a few users who have ID's in NT domain and AD that contain apostrophes, such 
 as O'Neill (fo'neill) , and O'Toole (go'toole).  I've been trying to give them 
 access to shares, but Samba doesn't
 seem to like this very much.
 
 I've been able to set up the ID's in our LDAP server so file ownership works, but 
 according to the log messages, Samba DOMAIN authentication seems to substitute an 
 underscore (go_toole) for the
 apostrophe when sending the request to AD. Of course, AD comes back with 
 NT_STATUS_NO_SUCH_USER.
 
 NT/2K servers seem to have supported this, which is why the ID's exist here in the 
 first place.  Is this a Samba restriction?  Is there a way around it?

H. Yeah, this is our (my) fault. We are very paranoid about
allowing quote and other characters in a username as we can pass
such names to UNIX script calls. Such strange characters can
be used to invoke behaviour we're worried might break security.

You could try adding the ' character to the define in include/smb.h
ie. Add it to :

#define SAFE_NETBIOS_CHARS . -_

And also you'll need to change the line in smbd/password.c
that reads :

alpha_strcpy(vuser-user.smb_name, smb_name, . _-$, sizeof(vuser-user.smb_name));

to 

alpha_strcpy(vuser-user.smb_name, smb_name, . _-$', sizeof(vuser-user.smb_name));

What do people thing about adding a safe chars option, or a
safe usernames that modifies/removes these filters ?

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


Re: [Samba] MySQL pdb: pdbedit: Segmentation Fault

2003-12-09 Thread Jeremy Allison
On Tue, Dec 09, 2003 at 09:18:12AM +0100, Didde Brockman wrote:
 Hey all!
 
 I just wanted to check in with you all to see if anyone has experienced a 
 Segmentation Fault when running smb's smbpasswd or pdbedit to edit attributes stored 
 in a MySQL pdb. Samba can authenticate off it, but whenever it tries to write / edit 
 the table it just returns with a Segmentation Fault.

Please send in a stack backtrace.

Thanks,

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


Re: [Samba] Machine password change failed: stub received bad data

2003-12-09 Thread Jeremy Allison
On Tue, Dec 09, 2003 at 12:35:29PM -0600, Jerry Haltom wrote:
 Samba 3.0 PDC, Windows 2k SP4 clients. After talking with you in the
 channel I had a bunch of logs. I don't see anything strange... but I
 don't know what to look for. I have an etherreal dump of the
 conversation between the two boxes, and have isolated hte
 NETSERVERPASSWORDSET request and reply. Don't know what to do with them
 though. Want the data?

Yes please ! That sounds like a call we don't support right now...

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


Re: [Samba] Samba panic in encoding

2003-12-09 Thread Jeremy Allison
On Tue, Dec 09, 2003 at 04:54:03PM +0800, Juer Lee wrote:
 Hi,
 
 Urgent help is needed ..
 
 I just upgraded Samba2.2.8a to Samba3.0.1rc1, but the fold I created before
 on a share can not be accessed anymore. Say, there is a folder áéfolder
  with some German characters ), it can be accessed in Samba2.2.8a; but it
 can NOT be accessed in Samba3.0.1rc1, it says 'The folder was moved or
 removed on a Win2k client. I understand the reason should be Samba3.0.1rc1
 is using Unicode on wire while the folder name is encoded differently in
 Samba2.2.8a. When I checked Samba logs, there is Samba panic says

When you get this panic, what are the character set encoding settings
in your smb.conf ? What system are you running this on ? I'm trying
to track this down

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


Re: [Samba] Win98 User List Problem

2003-12-09 Thread Jeremy Allison
On Tue, Dec 09, 2003 at 01:51:42PM -0200, Fabricio Adorno wrote:
 
 
 Jeremy Allison wrote:
 
 On Mon, Dec 08, 2003 at 04:10:50PM -0200, Fabricio Adorno wrote:
  
 
 Hi all,
 
 I'm trying to list users using user level share in windows 98, but I 
 always get the folowing message:
 
 
 [2003/12/08 13:46:51, 1] smbd/ipc.c:api_fd_reply(284)
  api_fd_reply: INVALID PIPE HANDLE: 0
 [2003/12/08 13:46:51, 2] 
 rpc_server/srv_samr_nt.c:_samr_lookup_domain(2540)
  Returning domain sid for domain XX- 
 S-1-5-21-1305940498-1192644665-829235722
 [2003/12/08 13:46:52, 1] smbd/ipc.c:api_fd_reply(284)
  api_fd_reply: INVALID PIPE HANDLE: 0
 [2003/12/08 13:46:52, 1] smbd/ipc.c:api_fd_reply(284)
  api_fd_reply: INVALID PIPE HANDLE: 0
 
 
 I have looked for an answer in samba-ntdom archives, but I couldn't find 
 it.
 What's the problem?
 
 
 I'm using samba-3.0.0.

 
 
 It's an erroneous error message. There were 2 bugs w.r.t. this problem,
 I think both are fixed for Samba 3.0.1. Please try the latest release
 candidate, this should fix the bug.
 
 
 I've just tested samba-3.0.1rc1, and it didn't work.

More details - including a debug level 10 log please.

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


Re: [Samba] Samba panic in encoding

2003-12-09 Thread Jeremy Allison
On Wed, Dec 10, 2003 at 09:19:15AM +0800, Juer Lee wrote:
 Thanks, Jeremy,
 
 In Samba2.2.8a, the encoding settings are client code page = 850 and
 character set = ISO8859-1. In Samba3.0.1rc1, I use default setting like
 unix charset = UTF8. The Samba server is running under customize RedHat
 7.2 Linux ( i386 ). The panic happened when I clicked on( maybe you need to
 click it repeatedly to reproduce this issue) the folder with German
 character name and Samba3.0.1rc1 is running, that folder was created when
 Samba2.2.8a was running.
 Are the information enough?

What clients are you using ? I will try and reproduce this here but
to be honest my suspicions are pointing at the iconv library component
of the glibc in your RedHat 7.2 box. That glibc is pretty old and
didn't get much of a work-out until Samba 3.0 started to stress it

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


Re: [Samba] Samba panic in encoding

2003-12-09 Thread Jeremy Allison
On Wed, Dec 10, 2003 at 10:12:27AM +0800, Juer Lee wrote:
 Oh, really? My compiler is gcc-2.95.3, isn't new enough to compile Samba
 3.0? Do you mean that I should use gcc-2.96 or higher?

Not gcc, *GLIBC* - the C library on the RedHat 7.2 box

That's the part that includes the iconv libraries Samba
is trying to use when you have a non ascii filename.

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


Re: [Samba] Samba panic in encoding

2003-12-09 Thread Jeremy Allison
On Wed, Dec 10, 2003 at 10:21:49AM +0800, Juer Lee wrote:
 Sorry, I use such package as my C libarary. Any problems with this?
 
 glib-devel-1.2.10-5.i386.rpm glibc-devel-2.2.4-13.i386.rpm
 glib10-1.0.6-10.i386.rpm glibc-profile-2.2.4-13.i386.rpm

Well I'm not sure, that's the problem. I don't run RH7.2 systems
any more here (I've moved mine to Fedora). I'll try and reproduce
the problem there, but if I can't it may take a while to set up
an old vmware RH 7.2 image to test.

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


Re: [Samba] Excel doesn't open read-only files on SAMBA share

2003-12-10 Thread Jeremy Allison
On Wed, Dec 10, 2003 at 06:21:21PM -0500, Murthy Kambhampaty wrote:
 Samba version: Samba 3.0 rebuild from SRPM on RedHat 8.0 w/XFS.
 
 
 I ran into this problem (which sounds a lot like Bugzilla Bug 51) when
 copying files from a CD-ROM to a Samba share on a W2K client.
 Double-clicking on the file name in an Explorer window gives the file not
 found error, but File-Open from Excel, and double-clicking the the filename
 in the file-open dialog-box works fine. The filenames all seem to be in
 plain English, though some have spaces and hyphens, so the non-ASCII
 characters issue doesn't seem to be present here?
 
 Removing the read-only flag from the client-side (the user has full
 permissions on the folder and contents) fixed the problem.
 
 It's low priority, of course, but it would be nice to see this fixed.

Already fixed for 3.0.1 - please download the latest release
candidate.

Thanks,

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


Re: [Samba] Oplock errors in 2.2.8a

2005-02-02 Thread Jeremy Allison
On Wed, Feb 02, 2005 at 12:41:34PM -0500, Verlezza, Domenic wrote:
 Hi,
  
 We are having connection timeout issues in Excel and Word.  Was this an
 issue that was resolved in post 3.0 versions?  We are running 2.2.8a.
  
 Below is the samba log file and I have attached a netmon output.
  
 Thanks,
 Domenic
  
  
 [2005/01/24 09:13:48, 0] smbd/oplock.c:oplock_break(797)
   oplock_break: receive_smb timed out after 30 seconds.
   oplock_break failed for file lotus/data/WeightedAverageFunction.xla
 (dev = 3996f31, inode = 66801, file_id = 197).
 [2005/01/24 09:13:48, 0] smbd/oplock.c:oplock_break(869)
   oplock_break: client failure in oplock break in file
 lotus/data/WeightedAverageFunction.xla

This was an issue I fixed in the 3.x code w.r.t. 1 second deferred
closes, so I'd definately upgrade. However, many oplock bugs are
actually network hardware problems.

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


[Samba] People with applications needing directories containing large numbers of files.

2005-02-02 Thread Jeremy Allison
I've been working (inspired by James Peach of SGI) on the
problem of using Samba3 with applications that need large
numbers of file (100,000 or more) per directory.

I think the current code in SVN in the SAMBA_3_0 branch
may hold the fix for this problem, so I'd like to request
people who need this functionality to give it a try.

The key was fixing the directory handling to read only
the current list requested instead of the old (up to 3.0.11)
behaviour of reading the entire directory into memory before
doling out names. Normally this would have broken OS/2
applications which have *very* strange delete semantics :-),
but by stealing logic from Samba4 (thanks tridge) I think
the current code in SVN handles this correctly.

So here's how to set up an application that needs large
number of files per directory in a way that doesn't damage
performance.

Firstly, you need to canonicalize all the files in the
directory to have one case, upper or lower - take your
pick (I chose upper as all my files were already upper
case names). Then set up a new custom share for the
application as follows :

[bigshare]
path = /home/jeremy/tmp/manyfilesdir
read only = no
default case = upper
preserve case = no
short preserve case = no

Of course, use your own path and settings, but set the
case options to match the case of all the files in your
directory. The path should point at the large directory
needed for the application - any new files created in
there and in any paths under it will be forced by smbd
into upper case - but smbd will no longer have to scan
the directory for names - it knows that if a file doesn't
exist in upper case then it doesn't exist at all.

So please give this a test if you have problems with
Samba and large sized directories. Remember this is in SVN code
only, it isn't in the 3.0.11 pre releases or rc candidates,
as we need to ensure this new code is correct. If you
can help me test it it'll be in 3.0.12 (security problems
notwithstanding :-).

Cheers,

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


[Samba] Re: People with applications needing directories containing large numbers of files.

2005-02-02 Thread Jeremy Allison
On Wed, Feb 02, 2005 at 05:38:19PM -0800, Jeremy Allison wrote:
 
 So please give this a test if you have problems with
 Samba and large sized directories. Remember this is in SVN code
 only, it isn't in the 3.0.11 pre releases or rc candidates,
 as we need to ensure this new code is correct. If you
 can help me test it it'll be in 3.0.12 (security problems
 notwithstanding :-).

Ok, I'm sorry - I spoke too soon :-(. I have one more fix to
do before this works Sorry for being stupid :-(.

Please ignore the earlier message :-(.

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


[Samba] Large numbers of files in a directory - take #2 :-)

2005-02-03 Thread Jeremy Allison
Ok, second attempt now I'm sure the code is working :-).

JohnT - if you want to turn this into a HOWTO or part of
the book, be my guest. Remember it'll be in 3.0.12, not
3.0.11 or below.

---
I've been working (inspired by James Peach of SGI) on the
problem of using Samba3 with applications that need large
numbers of files (100,000 or more) per directory.

I think the current code in SVN in the SAMBA_3_0 branch
may hold the fix for this problem, so I'd like to request
people who need this functionality to give it a try.

The key was fixing the directory handling to read only
the current list requested instead of the old (up to 3.0.11)
behaviour of reading the entire directory into memory before
doling out names. Normally this would have broken OS/2
applications which have *very* strange delete semantics :-),
but by stealing logic from Samba4 (thanks tridge) I think
the current code in SVN handles this correctly.

So here's how to set up an application that needs large
number of files per directory in a way that doesn't damage
performance.

Firstly, you need to canonicalize all the files in the
directory to have one case, upper or lower - take your
pick (I chose upper as all my files were already upper
case names). Then set up a new custom share for the
application as follows:

[bigshare]
path = /home/jeremy/tmp/manyfilesdir
read only = no
case sensitive = True
default case = upper
preserve case = no
short preserve case = no

Of course, use your own path and settings, but set the
case options to match the case of all the files in your
directory. The path should point at the large directory
needed for the application - any new files created in
there and in any paths under it will be forced by smbd
into upper case - but smbd will no longer have to scan
the directory for names - it knows that if a file doesn't
exist in upper case then it doesn't exist at all.

The secret to this is really in the case sensitive = True
line - it tells smbd never to scan for case-insensitive
versions of names. So if an application asks for a file
called FOO, and it can't be found by a simple stat call,
then smbd will return file not found immediately without
scanning the containing directory for a version of a different
case. The other xxx case xxx lines make this work by forcing
a consistent case on all files created by smbd.

Remember, all files and directories under the path directory
must be in upper case with this smb.conf stanza as smbd won't
be able to find lower case filenames with these settings. Also
note this is done on a per-share basis, allowing this to be set
only for a share servicing an application with this problematic
behaviour (using large numbers of entries in a directory) - the
rest of your smbd shares don't need to be affected.

This makes smbd *much* faster when dealing with large directories.
My test case has over 100,000 files and smbd now deals with this
very efficiently.

So please give this a test if you have problems with
Samba and large sized directories. Remember this is in SVN code
only, it isn't in the 3.0.11 pre releases or rc candidates,
as we need to ensure this new code is correct. If you
can help me test it it'll be in 3.0.12 (security problems
notwithstanding :-).

Cheers,

Jeremy.

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


Re: [Samba] Large numbers of files in a directory - take #2 :-)

2005-02-03 Thread Jeremy Allison
On Thu, Feb 03, 2005 at 01:01:28PM -0700, John H Terpstra wrote:
 Folks,
 
 This will go into the docs as soon as 3.0.11 is out.

Might need some work as the english is a little dept. of
redundancy dept. style :-).
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Re: Large numbers of files in a directory - take #2 :-)

2005-02-03 Thread Jeremy Allison
On Thu, Feb 03, 2005 at 03:21:41PM -0500, Michael Lueck wrote:
 Jeremy Allison wrote:
 
 The secret to this is really in the case sensitive = True
 line - it tells smbd never to scan for case-insensitive
 versions of names. So if an application asks for a file
 called FOO, and it can't be found by a simple stat call,
 then smbd will return file not found immediately without
 scanning the containing directory for a version of a different
 case. The other xxx case xxx lines make this work by forcing
 a consistent case on all files created by smbd.
 
 Hang on here... Windows app asks for file Foo and under this proposal it 
 will not be found?
 
 If so could this create an issue where Windows app writes Foo and is 
 successful yet goes back to read it and is told it is not there?

No, I didn't explain it well enough. Windows app asks for Foo, Samba
internally translates it to FOO and if that doesn't exist returns
not found.

The preserve case = no causes the internal translation, the case
sensitive = yes causes the return if not exist in exactly that case.

Sorry for the confusuion.

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


Re: [Samba] A smbd process pegging CPU at near 100% with v3.0.10-1 FC2 RPM

2005-02-04 Thread Jeremy Allison
On Fri, Feb 04, 2005 at 09:06:27AM -0800, Kel Way wrote:
  strace -p smbd_PID ?
 
 2170 root  25   0 11656 3228  10m R 95.9  0.5   2805:07 smbd
 
 [EMAIL PROTECTED] root]# strace -p 2170
 Process 2170 attached - interrupt to quit
 
 
 No output...  just sits there until I quit.  Thanks -

Attach to it with gdb then get a backtrace.

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


Re: [Samba] Delayed Write Failed and other similar errors on Windows machines

2005-02-04 Thread Jeremy Allison
On Thu, Feb 03, 2005 at 03:39:30PM -0800, Michael J. Welch, Ph.D. wrote:
 
 [An attempt to copy a file.]
 The specified network name is no longer available.
 [The file is not copied, but the name is placed into the directory.
 A second attempt works normally, unless one backs out of the folder,
 then comes back in again, in which case the failure is repeated.]
 
 [An attempt to open a VS C++ project with no .NCB file. VS tries to
 build another file, but fails during the write.]
 Windows - Delayed Write Failed
 Windows was unable to save all the data for the file
 \\Server\icr\active\Copy of Ctrl 4-3-1-33\SKAN_Talk.ncb. The data has
 been lost. This error may be caused by a failure of your
 computer hardware or network connection. Please try to save
 the file elsewhere.
 [The file is partially created.]

What messages are you getting in the Samba logs ? This looks like an
oplock break failure or in the extreme case smbd crash.

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


Re: [Samba] XP SP2 and slow logins/offline files sync: RPC changes?

2005-02-04 Thread Jeremy Allison
On Thu, Feb 03, 2005 at 02:15:43PM -0600, David Black wrote:

 Since I keep seeing odd RPC-type unauthenticated user calls happening 
 when things go slow, I wonder if the following may have anything to do 
 with it (RPC changes in XP SP2)?  More to the point: has Samba accounted 
 for the changes and/or does it need to?
 
 http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.mspx#EGAA

I don't think so. From the above link : RPC clients that use the named pipe 
protocol
sequence (ncacn_np) are exempt from all restrictions discussed in this section. 
The
named pipe protocol sequence cannot be restricted by default, due to several 
significant
backwards compatibility issues. 

Samba3 only implements the named pipe RPC's - only Samba4 does RPC over TCP.

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


[Samba] Why Windows sucks.

2005-02-04 Thread Jeremy Allison
The most eloquant rant on Windows I've read for a long long time


http://sfgate.com/cgi-bin/article.cgi?file=/gate/archive/2005/02/04/notes020405.DTL


There is nothing else like this phenomenon in the entire consumer culture. If
anything else performed as horribly as Windows, and on such a global scale,
consumers would scream bloody murder and demand their money back and there
would be some sort of investigation, class-action litigation, a demand for
Bill Gates' cute little geeky head on a platter.


Maybe people are finally starting to wake up on this. My 77 year old
Mum has been running on Linux now for 2 years - I only set her up
with an Internet account once I'd moved her over. I remote manage
it from here (Cupertino, CA - USA). She never has any problems. I
don't think she knows what a virus is :-).


I know I'm preaching to the choir here, but something in this rant
struck a chord.


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


Re: [Samba] Why Windows sucks.

2005-02-04 Thread Jeremy Allison
On Fri, Feb 04, 2005 at 07:24:23PM -0700, Craig White wrote:
 
 If Linux or Macintosh enjoyed the market penetration rates of users
 desktops that Windows has, they would be suffering from extensive
 exploits too.

No, I don't believe that's true. The counter-example to this is
Apache, which has greater than 60% market share, and a lot lower
exploit rate than IIS.

But we're digressing from Samba here, so if you want to reply
please do it directly to me and let's take if off list.

Thanks,

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


Re: [Samba] Re: Delayed Write Failed and other similar errors on Windows machines

2005-02-05 Thread Jeremy Allison
On Sat, Feb 05, 2005 at 01:07:38AM -0800, Michael J. Welch, Ph.D. wrote:
 
 I installed Samba 3.0.11, and the same problems are there.

Looks like it might be a hardware problem on your network then.

 I'm wondering if this could be what's going on: I try to delete a file and 
 Samba deletes it, but returns a code Windoze doesn't understand; then Windoze 
 tries to repeat the attempt to delete the file, but the second time it finds 
 no file (because it actually was deleted on the first attempt), then Windoze  
 reports that the file cannot be deleted because there is no file.
 
 Would an etherreal capture log be of any help?

Probably, but it might just confirm you have a network problem.

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


Re: [Samba] SAMBA ported to SkyOS

2005-02-08 Thread Jeremy Allison
On Tue, Feb 08, 2005 at 07:04:33AM +, Robert Szeleney wrote:
 Hi!
 
 I just want to announce that I successfully ported SAMBA without any
 modifications to SkyOS. If you want to take a look at the small SAMBA
 configuration utility used to configure SAMBA on SkyOS, you can take a look at
 http://www.skyos.org
 Thanks!

Congratulations ! Maybe Deryk will feature this on the news page... :-).

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


Re: [Samba] Incorrect disk size reported at 20.0 MB

2005-02-12 Thread Jeremy Allison
On Fri, Feb 11, 2005 at 07:47:34AM -0800, Richard Felkins wrote:
 
 I'm recently seeing an issue with how Samba is reporting
 the disk space available from a NFS share.  Checking the
 properties from a PC system displays all mapped network
 drives as having 20.0 MB size with zero free disk space
 available.  We updated to Samba version 3.0.11 this morning
 with no change in results.  I have checked the bug reports
 and haven't found anything that resembles this problem.
 Any ideas where I might look?

A network capture showing the disk space request would help,
as would a debug level 10 from smbd.

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


Re: [Samba] locking limit errors with Peachtree

2005-02-18 Thread Jeremy Allison
On Thu, Feb 17, 2005 at 03:40:26PM -0600, Andrew Gaffney wrote:
 In the samba domain I admin, one of the computers runs the Peachtree 
 accounting software. Today, McAfee antivirus was installed on that box (not 
 my doing) and now Peachtree keeps giving Locking table limit reached 
 errors. Is this an error from samba, Windows, or Peachtree? Is there a 
 limit to the number of file locks samba can grant at one time?

What version of Samba, what server OS platform. A little more info
would help.

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


Re: [Samba] ACL question

2005-02-22 Thread Jeremy Allison
On Tue, Feb 22, 2005 at 09:23:57AM +0100, Cisowski, Daniel wrote:
 Hi all,
 
 I'm reposting because there was no response from the list. I'd be glad if
 anybody could comment...
 
 I'm planning a migration from Sun Microsystems' PCNetLink CIFS service to
 Samba and have a problem I cannot solve:
 
 Is there a possibility to map Windows ACLs to reflect the following:
 
 We have user groups with their own group directories. We need to provide
 some users in their group directories the ability to
 read/create/modify/remove files, but they must not be able to change
 permissions on the files/directories. In particular they must not take
 ownership of files they are not owners of.
 
 I've tried to test this using Samba 3.0.10 on Solaris 9 and compiled with
 --with-acl-support. The configuration for my test share has the following
 ACL relevant settings:
   security mask = 0777
   force security mode = 0
   directory security mask = 0777
   force directory security mask = 0
 But, if I try to set the following permissions (all except Full Control):
   Modify,
   Read  Execute
   List Folder Contents
   Read
   Write
 using Windows Explorer connected to the share on a subdirectory of the
 share, I get 777 on UNIX file system and my Windows client sees 'full
 control'.
 
 I'd be glad if anybody could confirm if the situation described above is
 normal Samba behavior or not and if my problem can be solved at all (using
 Samba).

Ok, don't think of this as a Windows ACL problem, think of it as a POSIX
ACL problem and try and create a solution using that. That's what Samba3
is using under the covers anyway.

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


Re: [Samba] High CPU utilization for smbd on AIX

2005-02-22 Thread Jeremy Allison
On Tue, Feb 22, 2005 at 10:41:48AM -0600, Jeff Schoby wrote:
 
 Extracted, compiled, and installed form samba-latest tarball source.
 
 We have an application running on a windows 2000 server that mapps a
 drive to HEATHER.  This application will periodically poll the mapped
 drive for files (*.sql - small text files with an MSSQL query in them),
 read them, execute the query to an MSSQL server and then delete the
 file.  This directory can have anywhere from 0-30,000 files in it at any
 given time.  Whenever the process on the windows 2000 server is
 accessing the samba drive the smbd process servicing it pretty much eats
 up the cpu on the samba server.  The process on the win2k server goes
 through the files on the samba drive very slowly no matter how many
 files are in it.  
 
 Any ideas/suggestions?  

Ok - for a directory with 30,000 files in it you need to have the
latest svn source for Samba 3.0 (this fix isn't in 3.0.11 I'm afraid
as it was deemed too big a change at too late a stage) and to follow
the advice I gave on the list about how to set up a share to efficiently
cope with large directories. Someone from IBM is happily using this
for  100,000 file directories, so I'm comfortable that it works.

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


Re: [Samba] Excel File Open Issue - Possibly Samba Related

2005-02-22 Thread Jeremy Allison
On Tue, Feb 22, 2005 at 02:45:43PM -0500, Chad Vincent wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Having a workstation with an odd glitch, and I'm hoping someone can
 help.  We have a 35MB shared Excel file with our purchasing history in
 it.  (I know, I've been trying to talk them into a database of some
 sort, but they'll have none of that...)
 
 One workstation in the entire plant is having issues opening it.  The
 file will load, it will change status to [Shared] in the titlebar, then
 stop.
 
 Bad Workstation:
 Windows 2000
 Athlon 1600+
 256MB DDR 333
 Soyo Dragon KT333 Ultra Black
 Realtek 8139 on-board (Also tried PCI 8139)
 
 Server:
 Debian Stable
 2x Opteron 240
 Broadcom tg3 1000Mb NIC
 Samba 3.0.7-1 as a PDC

You need to upgrade. There have been several fixes in this area to
do with the rather strange way Excel uses SMB. None of them should
cause the client to disconnect, although a deferred open problem could
conceivably do this. It's just that many people are reporting much
better results with Excel and 3.0.11.

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


Re: [Samba] Printing only works sometimes

2005-02-23 Thread Jeremy Allison
On Wed, Feb 23, 2005 at 09:27:45PM -0800, Joseph Carri wrote:
 
 I have been trying to use Samba 2.2.6 to print from
 two SCO Openserver 5.0.7 servers (VDOHOM  VDOHOM2, IP
 addresses 192.168.1.121  192.168.1.122) on a WAN
 consisting of networks 192.168.1.0, 192.168.11.0 
 192.168.21.0, interconnected by ISDN leased lines
 using CISCO 805 routers.  The WAN has been up and
 running for months and there are no communications
 problems. Users have been runing various Oracle
 applications on Win2K servers, connecting to the
 internet through another Win2k server and a firewall,
 and connecting to the Unix servers with Telnet.
 
 I have created a user called samba on the two
 Openserver machines as well as on the Windows Domain. 
 The user was added with with useradd  smbpasswd.  I
 do not have any problem accessing or browsing test
 shares on the UNIX machines.
 
 My problem is this.  Some of the time, I can print
 from either Unix server without any problems at all. 
 However, about half the time, lpstat claims the
 document has been printed, but nothing in fact is
 printed.  The Win 2003 servers do not show any queued
 documents.

The problem seems to be with the lp subsystem on the SCO
OpenServer box. Probably the reason you're not getting much
help is due to the fact you're running on an *extremely*
(to say the least :-) unpopular platform.

I have a feeling people may be much more willing to help
if you were running on any other system than SCO.

SCO have not gone out of their way to make themselves
popular with the Free Software/Open Source communities
due to their legal activities.

Would it be possible to migrate your applications onto
a Linux varient instead ? They are known to be much
better integrated with Samba into a Windows printing
network (it works out of the box on my Red Hat Fedora
test machines).

Cheers,

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


Re: [Samba] Re: Printing only works sometimes

2005-02-24 Thread Jeremy Allison
On Thu, Feb 24, 2005 at 02:43:45PM +, Joseph Carri wrote:
 
 Thanks for the suggestion Jeremy, I do understand that SCO is no longer 
 popular, specially now that there's a very satisfactory alternative in the 
 various forms of Linux. However, I'm afraid that that's impossible.  You see 
 the two UNIX machines are what the entire firms MIS system runs on.  The MIS 
 system has been implemented and has grown and accreted over the years (since 
 1994) and is now a real behemoth.  To port it to another OS will be a major 
 job.
 
 In fact the reason I need to get the printing operational is for printing MIS 
 reports and other documents at the outlying locations.
 
 Could you give me an idea of what lp could do wrong to cause samba to time 
 out.  I'm pretty sure I could fool around with lp and get it to behave.  the 
 SCO lp is a very stable and reliable animal, and I've never had problems with 
 it over the years, but there's always a first time ...

You need to know exactly how lp is driving smbclient. That means delving into
the horror that is lp scripts. There's a reason everyone moved to CUPS :-).

Timeouts are usually name resolution issues though.

Sorry I can't be of more help,

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


Re: [Samba] Error while opening Excel VBA macros in Samba PDC windows clients

2005-02-27 Thread Jeremy Allison
On Sun, Feb 27, 2005 at 12:42:13PM -0500, Prakash Velayutham wrote:
 Hi All,
 
 Server OS - SuSE Pro 9.0
 Samba server version - samba3-3.0.9-1 (SuSE rpm)
 Client - Windows XP Pro SP 2
 Office XP SP 2
 
 I have everything working well such as machines joining domain, users
 logging in, roaming profiles etc. But when a user of the Samba domain
 tries to open a Excel VBA document, the following error occurs.
 Error accessing the system registry

To debug this we'll need a capture trace between the offending client
and smbd, and also a debug level 10 from the smbd in question.

Is it 100% reproducible ?

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


Re: [Samba] Error while opening Excel VBA macros in Samba PDC windows clients

2005-02-27 Thread Jeremy Allison
On Sun, Feb 27, 2005 at 04:58:28PM -0500, Prakash Velayutham wrote:
 Hi,
 
 I can do a ethereal capture if that is good enough. It is 100% 
 reproducible.
 I will send this info tomorrow as this is in my office.

That's great. I'll be at connectathon all next week so
my response time will be slow, but that's exactly what we
need.

Cheers, 

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


Re: [Samba] tdb locking errors?

2005-02-28 Thread Jeremy Allison
On Mon, Feb 28, 2005 at 12:56:47PM -0800, Tom Dickson wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 I was running a netbench performance test against Samba 3.0.11, and the 
 test has
 not been able to complete fully.
 
 The samba logs contain lines such as this:
 
 [2005/02/28 11:35:23, 1] smbd/service.c:make_connection_snum(645)
 ~  slave16 (192.168.133.116) connect to service netbench initially as user
 BENCHLAB+slave16 (uid=10016, gid=10001) (pid 6599)[2005/02/28 11:41:14, 0]
 tdb/tdbutil.c:tdb_log(725)
 ~  tdb(/var/lib/samba/locking.tdb): tdb_lock failed on list 86 ltype=0 
 (Resource
 deadlock avoided)
 [2005/02/28 11:45:48, 0] tdb/tdbutil.c:tdb_log(725)
 ~  tdb(/var/lib/samba/locking.tdb): tdb_lock failed on list 41 ltype=0 
 (Resource
 deadlock avoided)
 [2005/02/28 11:51:15, 0] tdb/tdbutil.c:tdb_log(725)
 ~  tdb(/var/lib/samba/locking.tdb): tdb_lock failed on list 86 ltype=0 
 (Resource
 deadlock avoided)
 
 Does this mean that we need to increase some parameter? Is there a known 
 failure
 in this area, or could it be a misconfiguration of the clients?
 
 I'll be rerunning this test with more detailed logging as I try to track 
 this
 issue down.
 
 Kernel 2.4.29
 Samba 3.0.11
 XFS filesystem

Not a current known problem. As far as I know this should work.

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


Re: [Samba] Re: OT: Is Samba an acronym?

2005-03-03 Thread Jeremy Allison
On Thu, Mar 03, 2005 at 11:19:18AM -0600, Gerald (Jerry) Carter wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 JLB wrote:
 
 | Hmm. Hasn't SMB been renamed CIFS?
 |
 | grep -i ^c.*i.*f.*s.* /usr/share/dict/words
 |
 | Maybe the next version of Samba should be
 | rechristened Californians. Or
 | Cliffs. Or even Coniferous!
 
 Don't suggest 'Californians' to jeremy (allison).
 He'll take you up on that.  Or maybe just 'San Jose'

Californians sounds *great* to me ! Dude ! It'll hold the room
together. :-).

Or how about just California - the CIFS file and print server ?

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


Re: [Samba] Re: OT: Is Samba an acronym?

2005-03-03 Thread Jeremy Allison
On Thu, Mar 03, 2005 at 12:12:14PM -0600, Gerald (Jerry) Carter wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Deryck Hodge wrote:
 
 | Or: California - the CIFS file and print server --
 | Opening Windows to a narrow, though sunny and beautiful,
 | stretch of the west-coast world.
 
 which will one day to fall into the ocean and
 make everyone in nevada rich with new beach front
 property.

Then I'm moving to Otisville. It's just a little place :-)
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] file locking

2005-03-04 Thread Jeremy Allison
On Fri, Mar 04, 2005 at 03:15:42PM -0600, sharif islam wrote:
 Is file locking dependent on the editor or we can control it via the
 oplocks option? here's the scenario: I usually use vi from the
 console. However, some of my colleagues might work on the same file
 from the windows machine using notepad, Jedit, dreamweaver etc. What
 is the best way to lock files?

You need an oplock-aware kernel and applications that are locking-aware
of each other (ie. POSIX apps that attempt to get an advisory fcntl lock
over any region the read/write). I don't know of any posix apps that do
this (certainly not vi).

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


Re: [Samba] file locking

2005-03-04 Thread Jeremy Allison
On Fri, Mar 04, 2005 at 01:23:31PM -0800, Mitch (WebCob) wrote:
 What about editors like Joe - when I run it on two terminals to access the
 same file, the second (and subsequent attempts) show read only...
 
 Admittedly that's probably FILE locking - not more granular like region
 based etc - but certainly appriate with logs of windows apps like notepad,
 dreamweaver etc?

I don't know about the Joe app - is it a POSIX app ? You need to turn off
oplocks and see what it does between 2 Samba clients.

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


Re: [Samba] Samba 3.0.12pre1 Available for Download

2005-03-04 Thread Jeremy Allison
On Fri, Mar 04, 2005 at 05:02:05PM -0800, Kevin Dalley wrote:
 Dare I ask about the performance enhancements?  Does it include
 listing *all* of the files in a directory with a large number of
 files?  See bug 2271.  If the new release might fix the problem, I'll
 give it a try.
 
 https://bugzilla.samba.org/show_bug.cgi?id=2271

It doesn't include this fix. The fix is for the smbd server side code
only. I'm looking at this fix - it's in my queue to examine. Not sure
when I'll be able to get to it (there are several others in the queue
first).

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


Re: [Samba] corruption in the locking tdb, samba panics

2005-03-07 Thread Jeremy Allison
On Mon, Mar 07, 2005 at 09:57:20AM +0100, Luca Olivetti wrote:
 Luca Olivetti wrote:
 
 I've looked at the changelog for 3.0.11 but I see nothing there 
 regarding this problem. I also searched google and I found something 
 similar here:
 
 http://tinyurl.com/3nhdj
 
 but, alas, no followup or solution.
 The new server is running mandrake linux 10.0, samba comes from the 
 updates rpms (3.0.10-0.1.100mdk) and it's running kernel 2.4.25 (I 
 cannot use 2.6 since this is a proliant server --not my decision-- and 
 its closed source hardware monitoring module only works with 2.4).
 The server is configured to use ldap for authentication 
 (openldap-2.1.25-6mdk) if it matters.
 
 
 I forgot to mention that this happened with win98, windows 2000 and 
 xp+sp2 clients.

If the locking database becomes corrupt then Samba will definately crash.
Does this happen every time you restart Samba (the locking databases are
re-initialised on restart) ? If so, is it repeatable on another machine ?

I don't have any outstanding bugs on the generic tdb or locking database
code so I'm looking for another possibility here.

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


Re: [Samba] Problem with 3.0.10 and 3.0.11 with 1 smbd process using99% cpu

2005-03-07 Thread Jeremy Allison
On Mon, Mar 07, 2005 at 09:26:08AM -0600, Gerald (Jerry) Carter wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Kaplan, Marc wrote:
 | I have this same problem on 3.0.10, and I also fixed
 | it by deleting the tdbs. My problem, had nothing to do
 | with printing, it was happening once I started winbindd
 | with security = ADS.
 |
 | Jerry, what would we need to do to track this bug down
 | in the tdb code? I have logs at level 10, ltrace output,
 | and a backtrace.
 |
 | Do you think that there were changes made to the tdb
 | code in 3.0.12 that might fix this?
 
 Jeremy recently applied a patch to break from an inifinite
 loop when tranversing a tdb.  This sounds like it might apply
 here.  That was post 3.0.12pre1 IIRC.  Try the latest SAMBA_3_0
 code.

But that only works for a corrupt tdb. If you have that you also
have other problems...

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


Re: [Samba] Links followed to my local filesystem

2005-03-07 Thread Jeremy Allison
On Mon, Mar 07, 2005 at 02:52:46PM -0500, Russell Polo wrote:
 in reply to this message :
 http://www.mail-archive.com/samba@lists.samba.org/msg54046.html
 
 I have the same problem. I have an old Redhat 7.3 box that I am trying 
 to replace with a FC3 box..
 
 when the FC3 box mounts samba directories the symlinks show up as 
 symlinks ( and are invalid as they point to non-local paths)
 
 When the RedHat 7.3 box mounts the same directories, it is unaware that 
 the symlinks are not directories. For years I have accumulated symlinks 
 that  files between different projects. So, it's not an easy option to 
 stop using symlinks
 
 I tried installing the old version of  samba on the new machine, (  rpm 
 -U samba-client-2.2.7-3.7.3.i386.rpm samba-common-2.2.7-3.7.3.i386.rpm 
 --force --nodeps ) it complained but seemed to work. But even with the 
 OLD rpms the symlinks still show up as symlinks. I  am at wits end.
 
 My friend found related link in bugzilla .
 https://bugzilla.samba.org/show_bug.cgi?id=2008
 
 
 If that is the problem, is there a quick and dirty trick to make  the 
 server think all clients are windows clients? ( clearly not an elegant 
 solution but would solve the current crisis )

Yeah, you could turn off the unix extensions (unix extensions = no).
That would do it. H. I need to think about this issue a bit

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


Re: [Samba] corruption in the locking tdb, samba panics

2005-03-07 Thread Jeremy Allison
On Mon, Mar 07, 2005 at 08:50:50PM +0100, Luca Olivetti wrote:
 
 code so I'm looking for another possibility here.
 
 such as? (I mean: there's something I can tune --or that I could have 
 badly configured-- either in the operating system or samba?)
 Are you aware of any followup to the url I posted with a very similar 
 problem?

Well I'm wondering if you might have a hardware issue with this box.
I'm not aware of any generic tdb corruption problems with the code.
That's why I want you to test on another box - a bit of an outside
chance, but still

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


[Samba] Re: Unable to set ACLs with Samba 3.0.11, near publication deadline

2005-03-08 Thread Jeremy Allison
On Tue, Mar 08, 2005 at 03:59:38PM -0600, Thomas Boutell wrote:
 Anybody have a roadkill cookbook?
 
 Because I have some crow to eat, and I'm not sure how best
 to prepare it. Sigh.
 
 I didn't have writable = yes set on the share. The fact that smbcacls 
 didn't work (and still doesn't work!) blinded me to this more obvious
 issue. Once I set writable = yes, of course, I was able to change
 acls from a true Windows client... which was of course my
 actual goal. I'd created my test files in advance on the Linux
 side, so the no-write-permissions-at-all issue wasn't obvious at
 any other time.
 
 Thanks for the attention you gave to the matter. Next time, if I'm
 not able to spot the issue myself, I'll be sure to include my
 *entire* smb.conf in the report.

I'm glad you spotted it - your request was next on my queue once
I'd fixed the findfirst/findnext problem with smbclient

Cheers,

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


Re: [Samba] Excel File Open Issue - Possibly Samba Related

2005-03-10 Thread Jeremy Allison
On Wed, Mar 09, 2005 at 09:54:29AM -0500, klubarpop wrote:
 We were having the same problem with Excel ... Different version of Samba.
 Applying a fix detailed in MS KB # 324491 solved the problem for us.  (We
 use Office 11 although the fix talks about Office 10  -- Office 11 = Office
 2003  Office 10 = Office XP for those who don't keep up with such things.)
 
 Do a search for QFE_Saskatchewan for the registry key.  Anyone have any idea
 why the key is named Saskatchewan?
 
 Hope this helps
 Ken Lubar
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Chad Vincent
 Sent: Wednesday, March 09, 2005 9:39 AM
 To: samba@lists.samba.org
 Subject: Re: [Samba] Excel File Open Issue - Possibly Samba Related
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Okay  Problem did not go away.  I un-shared (multi-user) the file to
 clear out the changelog, and the problem did go away.  At this point I'm
 going to assume a malformed entry in the changelog or a changelog that was
 just too darn big.  (Before, size was 25MB, after removing sharing it was
 2.5MB and opened in 1/8th the time.)
 
 HOWEVER, upon upgrading to 3.0.11 as suggested, now ALL shared
 (multi-user) Excel files are, at apparent random, displaying a message This
 file has been locked.  To save changes you must save under a different file
 name and merge(blah, blah)  We never had this problem under 3.0.7.  I
 have log level=1 and nothing is showing up in the logs.

Ok - I think I may have fixed this in the current SVN code in SAMBA_3_0
without needing the strange registry keys.

I'm looking for people willing to test this before the 3.0.12 release.

Please give ths code a test and give me some feedback. I can't reproduce
the problem here with Office 2003 and the latest SAMBA_3_0 SVN code.

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


Re: [Samba] Re.: Strange Samba Problem

2005-03-11 Thread Jeremy Allison
On Fri, Mar 11, 2005 at 07:27:54PM +0100, Reimar Bauer wrote:
Content-Description: signed data
 We do have exactly the same problem. Is this already solved?
 
 cheers
 Reimar
 
 
 
 Running SuSE 9.2. This problem happens with both the SuSE-supplied Samba on 
 the DVD, as well as the SuSE update rpms to 3.0.9. We even removed all the 
 *.tdb files and recreated the installation from scratch, as always carefully 
 following the steps in S3BE. FWIW, this same config worked previously on 
 this 
 and earlier systems; we did not change anything on this system (other than 
 applying YOU patches), and since we fire the Windows VM infrequently, we 
 can't correlate when this problem started with any specific YOU patches..
 
 Basically, we use Samba on a host to make printers and shares available to 
 Windows running on the same host in a VMware VM. We don't want anyone else 
 on 
 the LAN to see shares on this host.
 
 The problem manifests itself in several ways: 
 
 1. MS Office applications complain a file is either locked by another user 
 and 
 can be opened read-only, or that a file no longer exists.

I think the MS-Office problems are fixed in the 3.0.12 pre release Jerry is 
about
to ship.

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


Re: [Samba] reduce_name and ACL's

2005-03-11 Thread Jeremy Allison
On Fri, Mar 11, 2005 at 08:41:05AM -0500, William Jojo wrote:
 
 
 AIX 5.2, Samba 3.0.11, OpenLDAP 2.2.23.
 
 
 Can someone explain what reduce name is supposed to be checking?

It's supposed to get the real path on the system from the given path,
resolving symlinks etc. This allows us to make an access decision
that a pathname is really below the given share pathname (ie. it's
safe to access from this share tid).

 The final debug uses p as the reduced name, but p is NULL to start and
 only has a value during the code path IF there was no entry found on the
 first call to realpath at which point the last component is removed and we
 try again.
 
 Now since p points to the character after the last nulled '/' of tmp_fname
 which is then totally reconstructed, the DEBUG-3 at the end will never be
 right as its value is no longer relavent.
 
 Is it supposed to be the fully qualified name based on the connection of
 the dir or the file in the dir. Or is it supposed to be the basename of
 a non-directory object?

Ah. The use of p in that debug looks wrong - I think it should be 
resolved_name
instead. I'll check and fix it.

Thanks,

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


Re: [Samba] Network drive disconnects with XP

2005-03-11 Thread Jeremy Allison
On Fri, Mar 11, 2005 at 08:52:40PM +0100, [EMAIL PROTECTED] wrote:
 Hi,
 
 I have a SUSE 9.2 samba network drive server and connect with 
 a Windows 98 PC and a Windows XP PC in a local network.
 
 When I leave the XP on over night it seems that the drive gets 
 disconnected. The 98 PC can run for weeks and does never get 
 disconnected. Lately, I can not even connect again with the 
 XP and it says that the drive is already under use.
 
 Is there a way to solve this problem? It is causing considerable 
 difficulties not being able to connect with the XP machine.

What version of Samba ? I believe there was a fix for this that
went into around 3.0.10 or 3.0.11.

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


Re: [Samba] UTF-8 problem when not using UTF-8, but Umlauts

2005-03-12 Thread Jeremy Allison
On Sat, Mar 12, 2005 at 12:12:27PM +0100, Gerhard Strangar wrote:
 High,
 
 I'm running some Windows 9x Clients which don't use Unicode for SMB. It
 didn't cause any problems when using Samba 2, because the UNIX machines
 use ISO8859-1 and the Windows 9x use CP850 and no conversion was
 neccessary, German Umlauts like ä, ö, ü, Ä, Ö, Ü and ß were the same on
 UNIX and Windows.
 Now I'm trying to switch to Samba 3.0.11 and it doesn't work anymore. I
 tried dos charset = CP850 together with unix charset = ISO8859-1 as
 well as dos charset = ISO8859-1 together with unix charset =
 ISO8859-1. First I thought everything was okay, because the characters
 are diplaed correctly, but if a Windows 9x client tried to delete a file
 containing Umlauts or the ß, it fails and diplays the error message:
 File cannot be deleted.  File system error (1026)
 When it tries to create such a file, it gets some completely different
 name.
 
 smbstatus says:
 init_iconv: Conversion from UTF-16LE to ISO8859-1 not supported
 init_iconv: Attempting to replace with conversion from UTF-16LE to ASCII

The iconv library on this system is broken. What UNIX are you using ?

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


Re: [Samba] UTF-8 problem when not using UTF-8, but Umlauts

2005-03-12 Thread Jeremy Allison
On Sat, Mar 12, 2005 at 07:29:24PM +0100, Gerhard Strangar wrote:
 Jeremy Allison wrote:
 
   smbstatus says:
   init_iconv: Conversion from UTF-16LE to ISO8859-1 not supported
   init_iconv: Attempting to replace with conversion from UTF-16LE to ASCII
  The iconv library on this system is broken. What UNIX are you using ?
 
 Solaris 9 for 32-bit x86

It has a broken iconv library. Either replace it with GNU iconv, or
use Linux on x86 (which has a working iconv library).

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


Re: [Samba] UTF-8 problem when not using UTF-8, but Umlauts

2005-03-13 Thread Jeremy Allison
On Sun, Mar 13, 2005 at 02:17:13PM +0100, Gerhard Strangar wrote:
 Jeremy Allison wrote:
 
The iconv library on this system is broken. What UNIX are you using ?
   Solaris 9 for 32-bit x86
  It has a broken iconv library.
 
 Which stnadard or RFC does it violate?

I'm not saying it violates any standard or RFC, what I'm saying is
it doesn't work :-).

Convering from UCS2-LE to ISO8859-1 is a pretty common operation,
if your iconv library doesn't seem to have support for it then there's
something wrong. I don't use Solaris so I don't know what.

 Installing libiconv didn't create a
 /usr/local/samba/lib/charset/ISO8859-1.so
 which smbstatus tries to open all the time.

I'd just use Linux then :-). iconv is configured correctly
and just works on that platform.

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


Re: [Samba] [SMB 3.0.10] File Locking Mechanism Windows - Unix

2005-03-14 Thread Jeremy Allison
On Mon, Mar 14, 2005 at 03:12:34PM +0530, Asif, M wrote:
 
 The files under this directory are modified both from Windows and Solaris
 programatically. When ever a process accesses a file in this directory, it
 opens it in an exclusive mode ( DENY_ALL ). Now, this works fine between two
 processes on Windows and between two UNIX process (Gives equivalent of
 Winods error  53, File is used by another process) . But this does not work
 between Winodws and Unix. i.e Both of them are able to open the file in
 exclusive mode!! I ran the 'fuser' command in such a situation ( when both
 had exclusive accesses to the file) and to my surprise I found that both
 smbd and the unix process are listed

What is the UNIX process doing to enforce exclusivity ? What system call
do you think it does ?

Remember, share modes have no meaning on UNIX.

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


Re: [Samba] Samba and Preallocated Files

2005-03-15 Thread Jeremy Allison
On Tue, Mar 15, 2005 at 06:31:19AM -0500, [EMAIL PROTECTED] wrote:
 A question about capturing videos to a Samba  share... 
 
 When Apple's Final Cut Pro captures video files, it  pre-allocates file space 
 on the destination volume. 
 
 If you capture to a  local volume that's physically attached to a Macintosh, 
 or if you capture to a  network volume via AFP (Apple File Sharing Protocol), 
 you can see that Final Cut  instantly creates a file of the anticipated size 
 on the destination volume at  the moment just before capture begins (the 
 anticipated size is based on the  maximum capture time limit set by a user). 
 
 However, when capturing  videos to a Windows or Samba share, Final Cut 
 actually will write out dummy  data to a file, and then presumably it 
 replaces the 
 dummy data with real data  as the capture moves along. 
 
 Effectively, this makes Samba and Windows  shares useless for capturing Final 
 Cut videos. Because, for instance, if you  expect to capture a 20-minute DV 
 clip, it will take approximately 10 minutes to  create the pre-allocated file 
 before capturing even begins -- even when you are  connecting via a dedicated 
 Gigabit Ethernet link. The process seems to chug  along unbelievably slowly. 
 And if you were capturing uncompressed video (which  has about 5x the data 
 rate 
 of DV video) well, the wait would be interminable.  
 
 Can anybody on this list see a way to allow Final Cut to instantly  create 
 that pre allocated file space that it wants to create on a Samba share?  Are 
 their any Samba settings that could make this possible? It would be a coup  
 for 
 Samba! 
 
 BTW, Apple's IMovie doesn't go through this pre allocation  business. But, 
 alas, IMovie doesn't capture timecode data, so Final Cut users  who want to 
 work 
 with Samba shares can't simply switch to IMovie for capturing  their videos. 

That's a Mac client issue. We do support sparse pre-allocation on the
server side. I'd raise it as a bug with Apple.

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


Re: [Samba] [SMB 3.0.10] File Locking Mechanism Windows - Unix

2005-03-15 Thread Jeremy Allison
On Tue, Mar 15, 2005 at 07:54:38PM +0530, Asif, M wrote:
 Hello Jeremy,
 
 Thanks for your response.
 
 I tried the following
 
 On Windows side, an MFC application with the code given below access the
 file using the samba share.
 
 
   CString strFile =
 _T(180.144.1.11\\netmbase\\tmp\\test.txt);
   CStdioFile fValueFile;
   if (!fValueFile.Open( strFile ,CFile::modeWrite |
 CFile::shareExclusive) )
   {
   wcout_T(Open failed)endl;
   }
   else
   {
   //wcout_T(Open Success)endl;
   }
 
   fValueFile.WriteString( strt );
   getchar()
 
   fValueFile.Close();
 
 On UNIX side, code is something similar to this
 
   int fid =
 open(/export/home/scsd13/kiran/NetMBase/tmp/test.txt, O_RDWR|O_EXCL ) ;
   if( 0  fid )
   {
   perror(open),exit(1);
   }
 
   struct flock lockDetails ;
   lockDetails.l_start = 0 ;
   lockDetails.l_whence = SEEK_SET;
   lockDetails.l_len = 0 ;
   lockDetails.l_type = F_WRLCK ;
   int nErr = fcntl( fid, F_SETLK, lockDetails);
   if( 0  nErr )
   {
   perror(lock),exit(1);
   }
   getchar();
   close(fid);
   
 Now,
 
 1. Two instances of the executable runs on Windows side, open fails with
 sharing violation if the first one is not released ( blocked at getchar()
 call) , no problem.
 2. Same is the case with two instances of UNIX processes.
 3.The unix process locks the file and does not release it (blocked at
 getchar() ), and then the windows client is executed, WriteString throws an
 exceptoin giving error 33(locked by other process). No problem 4. Now if the
 Windows client opens the file first (blocked at getchar() ) and then the
 unix client is invoked, the fcntl call succeeds... 
 
 I tried lockf() instead of fcntl(), turned on mandatory locking etc, but
 with no success.
 
 Am I missing out some thing? Is there an easier way for getting this work?
 Basically, I want to ensure that there is no read happening when any one
 (from unix or windows) is writing into the file an vice versa.

What OS are you running on ? This code will work on Linux with kernel
oplocks, and if you turn off oplocks should work on other UNIXes.

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


Re: [Samba] Problems with MS Office (Excel/Word) Samba 3.0.11, (moved to testing 3.0.12-RC1) attn Jerry

2005-03-15 Thread Jeremy Allison
On Tue, Mar 15, 2005 at 09:36:31AM -0500, Nathan Vidican wrote:
 We are running with a little over 100GB of office data, and about 200GB misc
 other data shared to approximately 50 users using samba across two servers
 acting as PDC and BDC to Windows 2000  XP Pro clients. Also using roaming
 profiles and ldap backend inclusive of nss_ldap and pam_ldap for the unix
 side - works well except for the more recent and horribly crippling MS
 Office bug.
 
 Tried disabling/veto'ing oplocks, but to no avail, so we've opted to try
 3.0.12-rc1 on one of the two servers; all is well at this point thus far
 (been running about 10mins), figured I'd drop the list a line; Just a note -
 we've been having huge problems with MS Excel and Word running on samba
 3.0.11, moved over to 3.0.12-rc1, (even though this is a production
 environment).

Please be exact on the version of MS-Office you're running with. I can't
reproduce the problems with a MS-Office 2003 - if you're running an earlier
version I'll need to go back a rev or so.

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


Re: [Samba] SMB signing broken? 3.0.7 - 3.0.8

2005-03-15 Thread Jeremy Allison
On Tue, Mar 15, 2005 at 03:00:17PM +, Tim wrote:
 Hi all.
 
 I originally suspected this problem was with netbios (which I have
 disabled by default) and Jerry has helped me out a bit with but I've
 been doing some more digging and I think the problem lies back further
 than I expected.
 
 I was trying to upgrade from 3.0.7 to 3.0.11 so I've recompiled all
 versions back from 3.0.11 and the problem first occured in 3.0.8.  The
 issue is with winbind, and the error I'm getting is
 failed tcon_X with NT_STATUS_ACCESS_DENIED:
 
 === 3.0.8:  /usr/bin/winbind -i -d10 ===
 ...
 Got KRB5 session key of length 8
 SMB signing enabled!
 cli_simple_set_signing: user_session_key
 [000] C8 5E D6 1A A1 46 10 BA   .^...F..
 cli_simple_set_signing: NULL response_data
 simple_packet_signature: sequence number 0
 client_sign_outgoing_message: sent SMB signature of
 [000] 84 84 78 B3 60 4A 05 5B   ..x.`J.[
 store_sequence_for_reply: stored seq = 1 mid = 2
 ...
 client_check_incoming_message: BAD SIG: wanted SMB signature of
 [000] D7 08 07 13 97 AC E9 8B   
 client_check_incoming_message: BAD SIG: got SMB signature of
 [000] EF 85 1C D4 6A 1D AC 9D   j...
 
 
 
 So... and please correct me if I'm wrong, but something changed
 between 3.0.7 and 3.0.8 to do with SMB signing.  The signature
 size seems to have changed, but I don't know enough about the
 SMB protocol to work out what this would mean.
 
 I also notice this in the Changelog:
 
   o Fixes for kerberos interoperability with Windows 200x
 domains when using DES keys.

Can you try this patch. It reverts that change.

Jeremy.
Index: libsmb/smb_signing.c
===
--- libsmb/smb_signing.c(revision 5789)
+++ libsmb/smb_signing.c(working copy)
@@ -277,14 +277,17 @@
MD5Init(md5_ctx);
 
/* intialise with the key */
+   MD5Update(md5_ctx, data-mac_key.data, data-mac_key.length); 
+#if 0
+   /* JRA - apparently this is incorrect. */
/* NB. When making and verifying SMB signatures, Windows apparently
zero-pads the key to 128 bits if it isn't long enough.
From Nalin Dahyabhai [EMAIL PROTECTED] */
-   MD5Update(md5_ctx, data-mac_key.data, data-mac_key.length); 
if (data-mac_key.length  sizeof(key_buf)) {
memset(key_buf, 0, sizeof(key_buf));
MD5Update(md5_ctx, key_buf, sizeof(key_buf) - 
data-mac_key.length);
}
+#endif
 
/* copy in the first bit of the SMB header */
MD5Update(md5_ctx, buf + 4, smb_ss_field - 4);
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] NEW Mcafee problem, samba share

2005-03-15 Thread Jeremy Allison
On Tue, Mar 15, 2005 at 10:04:40AM -0600, Mark Nehemiah wrote:
 After our mcafee ASAP product updated last night, users can not access
 samba shares from  some applications.  I believe this to be mcafee
 problem, and am on hold  with tech-supp right now.
 
 Here's the problem as I know so far.
 Windows Explorer works fine all drives.
 SolidWorks cannot access the root of any samba drive.
 FrontPage cannot access the root of any samba drive.
 
 Uninstall mcafee, problems go away.

What version of Samba, what server, what applications. Trace please ?

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


Re: [Samba] Samba and Preallocated Files

2005-03-15 Thread Jeremy Allison
On Tue, Mar 15, 2005 at 06:13:17PM -0500, [EMAIL PROTECTED] wrote:
  
 Isn't the Mac Samba Client compiled from a stock Samba samba.org source  
 code? And if so, shouldn't it behave as any other Samba client. Or is Apple  
 doing 
 their own thing with the Samba client? 

Apple maintains their own code - based originally on the FreeBSD smbfs code
I believe.

 I've been Googling for information to see if it's possible to compile my  own 
 Samba for OS X and haven't come up with much. 
  
 If it IS an Apple bug, I would bet dollars to doughnuts that Apple will  
 quietly neglect the issue. In my experience with the company, they don't want 
 to 
  do ANYTHING that will help non-Apple products compete with Apple storage  
 devices. They will simply leave it broken. 

No, that's not my experience with Conrad - he's the Apple developer in 
charge of their CIFS client. But there's only one of him and he has
a schedule.

 That's not to say that it's the Samba Team's job to fix it. I've just been  
 dealing with Apple Final Cut Pro developers for a long time and I know of  
 what 
 I speak! All I've gotten out of them is it's the Quicktime API that's  
 responsible, and they'll have to change Quicktime to change the behavior when 
  
 writing to a Samba share.
  
 Does that ring true to you? 

Either Quicktime could be fixed, or the Apple CIFS client could be fixed.
The server isn't doing anything wrong - it's being asked to write data and
so it does.

 Have you heard of XSan and XServe RAID? 

I've heard of them, yes.

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


Re: [Samba] File copying under WIN98

2005-03-21 Thread Jeremy Allison
On Mon, Mar 21, 2005 at 02:01:17PM +0100, Jens Wulf wrote:
 with the Samba3.0.12 release i encountered the following problem :
 when i try to copy a file from a samba share to the local disk then the 
 process hangs with the windows-message
 Preparing to copy (my translation from the german message).
 In a WIN98-DOS-Windows the copy command hangs too, but the file is created.
 The copying from my WIN-XP HOME works.
 My previous installed version 3.0.9 worked fine with the same configuration 
 (smb.conf)
 
 does anyone have this problem too - and maybe a solution except 
 reinstalling old samba ?

Ok, I screwed up bigtime :-(. This one is my fault. I've attached my
proposed patch but more testing would be welcome.

We'll probably have to do a brown-paper-bag 3.0.13 over this one :-(.

Sorry.

Jeremy.
Index: smbd/dir.c
===
--- smbd/dir.c  (revision 5921)
+++ smbd/dir.c  (working copy)
@@ -595,6 +595,13 @@
 BOOL dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, 
SMB_STRUCT_STAT *pst)
 {
ZERO_STRUCTP(pst);
+
+   if (!dptr-has_wild  (dptr-dir_hnd-offset == -1)) {
+   /* This is a singleton directory and we're already at the end. 
*/
+   *poffset = -1;
+   return False;
+   }
+
while (SearchDir(dptr-dir_hnd, name, poffset) == True) {
if (is_visible_file(dptr-conn, dptr-path, name, pst, True)) {
return True;
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] Strong Session Key and XP

2005-03-22 Thread Jeremy Allison
On Tue, Mar 22, 2005 at 05:10:18AM -0600, Gerald (Jerry) Carter wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Anthony Linux wrote:
 
 ...
 | I did a diff of the default Win XP security settings
 | and what was applied by the template.  Found the
 | culprit:  Domain Member -- Require Strong
 | (Windows 2000 or later) Session Key: Enabled.
 |
 | Once I disabled that, it worked fine.  Users
 | could login now, no problems.
 |
 | So, I wanted to share that tidbit, in case anyone
 | else is having this problem.
 |
 | Also, I was wondering if Samba can satisfy this
 | security setting?  That is, keep the Strong Session
 | Key enabled on the XP workstation and configure the
 | server to comply?  I'm worried that my security people
 | won't like me deviating from their default template
 | -- but if it's the only way to make it work, then so be
 | it.
 
 This is the 128-bit session key right ?  Andrew Bartlett
 was working on that but has since jumped ship to work on
 Samba 4.  So right now, no one is looking at this for
 Samba 3.  But things can change.

It's on my list of things to do after the EA support for
OS/2 and the per-file-change-notify patch. So many things,
so little time I'll be bugging Mr. Bartlett about it
too :-).

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


Re: [Samba] ACLS and samba

2005-03-23 Thread Jeremy Allison
On Thu, Mar 24, 2005 at 12:06:56AM +0800, Adrian Chow wrote:
 HI,
 
 I guess this question have been asked before:-
 
 I am running 3.0.12 for samba with acls.
 
 I have a samba share folder called abc with groups art able to write.  
 group:art:rwx
 
 Whenever i write with a user from the art group to the folder, the group id 
 of the file changes to the id of the user instead of remaining as art.
 
 What do i need to configure so that art group stays as the group id for that 
 file?

You need to set the set GID bit on the directory. This ensures that
files created within it inherit the group of the directory, not the
effective group id of the creating process.

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


Re: [Samba] Upgrade 3.0.11 to 3.0.12 serious issues

2005-03-23 Thread Jeremy Allison
On Wed, Mar 23, 2005 at 10:59:32AM +0100, Bolke de Bruin wrote:
 Linux Samba 3.0.12 + acl (ext3)
 ===
 
 
 When upgrading from 3.0.11 to 3.0.12 ACL's do not seem get used anymore. 
 We are using the inherit acls options for both maps and files. After the 
 upgrade users are unable to create new files in directories where they 
 used to have privileges for. The error returned is: The file already 
 exists. Do you want to overwrite when clicking yes an access denied 
 error is displayed. Note the file did *not* exist.

Just fixed this in SVN. Sorry for the problem (checking the wrong tagtype
in an acl list). It'll be fixed in 3.0.13.

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


Re: [Samba] Question on Inheriting Permissions

2005-03-23 Thread Jeremy Allison
On Wed, Mar 23, 2005 at 09:38:35AM -0800, Tom Naves wrote:
 I asked this question yesterday and got some really good answers that I will
 be able to use later.  My problem was that I did not ask the question in an
 exact enough way.
 
 Here is what I am trying to do:
 
 I have a share on my Samba server called art.  The directory is owned by the
 user root and the group tech doc.  I have set the permissions like this on
 the directroy:
 
 drwxrwxr_x  That is I want root to have read, write, execute.  I want the
 tech doc group to have read, write, execute and I want all the orther users
 to have read, write.
 
 I have these permissions set on the directory art.  Is there a way to
 configure my smb.conf so that any file that gets created in or copied to
 this directory to have these permissions and, if possible, to be owned by
 the above user and group?

Set the set-group-id bit on the directory to have it inherit the group
owner. I have a new parameter in SVN (will be in Samba 3.0.14) called
inherit owner which will cause a file to inherit it's ownership from
the containing directory. You can also use inherit permissions.

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


Re: [Samba] File locking problem

2005-03-23 Thread Jeremy Allison
On Wed, Mar 23, 2005 at 08:38:59PM +0100, Ulrik Guenther wrote:
 Hello everyone,
 
 I have a 50-client Samba installation here (version of Samba is 3.0.12). The 
 problem is, that files are not locked correctly. The scenario is the 
 following:
 1. User A opens a word document file and edits it
 2. User B tries to open the same file, too
 3. Instead of getting a warning that the file is in use by another user (like 
 it was when we had NT4), Word opens the file without any problems
 4. Now, both users edit the file and save it.
 5. Result: Data loss.
 
 This was just an example, the same thing occurs with AutoCAD files, Excel 
 files, OpenOffice.org files,... every file, to sum it up.
 I already tried turning opportunistic locking off, turning strict locking 
 on/off, nothing worked (you can find the smb.conf of the server attached to 
 this mail). Last weekend I noticed a strange behavior: I was logged in on two 
 clients with the same user and tried to open the same file on both. This 
 time, the program (tried with Notepad, Word) protested and said that the file 
 is already open.
 If I understood the functionality of Samba right, a new smbd process is 
 spawned for every client who logs on (for every user or for every client?)... 
 so might this be an issue with SystemV IPC?
 On this server we use LDAP for storing group and user information for Samba. 
 The following data might also be valuable:
 * the server is empowered by an AMD Opteron 144 with 1 GiB of RAM
 * the operating system is FreeBSD 5.3-STABLE
 * Samba version is 3.0.12
 * OpenLDAP version is 2.2.23
 * OpenLDAP is running on the same computer as Samba
 * the data is stored on a Geom-Vinum RAID-1 volume set (mirrored)
 
 Please, please help as soon as possible, as we already have lost a big bunch 
 of data! If you need more information, just ask, I'll try to provide it asap.

This is strange - I don't see this with the current code, I don't
think too many others are either (there are people reporting issues
with Excel, but nothing this generic).

Try getting a debug level 10 log from two clients opening the same
file simultaneously.

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


Re: [Samba] Re: Different behaviour of samba share in XP and Windows 2003 Server

2005-03-24 Thread Jeremy Allison
On Thu, Mar 24, 2005 at 11:11:44PM +0530, Kiran VM wrote:
 Hello Jerry,
 
 No CloseHandle() call is made in both the case. CFile (or for that
 reason CStdioFile) Close() method will close the OS file handle.
 (closehandle() in the sample code is commented given can be ignored)
 
 Just to make it a bit more clearer, the executable (for testing i just
 put the sample code above inside a for loop of 1000) is run from a
 win2k3 server and xp machine. XP shows no handle increase leak (handle
 count of 85), but in Win2k3 the handle count was around 1085 ( for
 1000 iterations). This information i got from the windows task
 manager. Upon this, i tried the procexp tool from sysinternals. This
 clearly showed that the Handle being leaked is a file handle,
 \\TestServer\TestShare in our case. (This is not the file as such but
 the directory).
 
 BTW, my samba server is on Solaris 9.
 
 Please let me know if you erquire any further information...

Can you send me the binary (.exe) of this program. Also, the
information on how to report any handle leaks on the Windows
side. Given that info I can try to track this one on my own.

Thanks,

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


Re: [Samba] Problems with Excel MS Word files (still)

2005-03-24 Thread Jeremy Allison
On Wed, Mar 23, 2005 at 10:18:23AM -0500, Nathan Vidican wrote:
 Problem is apparently with locking issues, disabled oplocks in the [general]
 section, and the problem actually got worse...
 
 Here's what happens:
 
 User-A part of group1, opens Excel file off of share, saves, exits...
 User-B (or even User-A for that matter) tries to re-open same file, get
 error stating it's locked and can only open for read-only access...
 
 Both users in the same group, and share definition looks like this:
 
 [mysharename]
 path = /server/some/dir
 read only = no
 Valid users = @group1
 Write list = @group1
 Force group = group1
 
 (general section defines create files as mode 0660, and directories as 0770
 (which works - apparently)
 
 I have upgraded to 3.0.12, and the problem persists. We're running short on
 options, and I really don't know what to do from here... ANY suggestion
 would be greatly appreciated, if more information is required just let me
 know, figured before I spun wheels I'd make note of what's going on first.
 We're running two samba servers using ldap backend for domain/users/etc.

Ok, I have a working theory for this. It concerns ACLs and what happens
when excel wants to update the filetime on a file the user doesn't own.

Normally you just set the dos filetime parameter to allow this (this
causes a timestamp to be updated on a file if you can write to it - normally
POSIX only allows this if you're the owner). I've realised the codepath
here doesn't check ACL semantics. This is a bug we've had since we
introduced ACLs a long time ago but only now seems to have been triggered.

Here is a patch to the just released 3.0.13 that causes ACL entries to be
properly checked when dos filetime= True has been set.

Please try this on top of 3.0.13 and let me know if it fixes the issues.

Jeremy.
Index: smbd/posix_acls.c
===
--- smbd/posix_acls.c   (revision 6045)
+++ smbd/posix_acls.c   (working copy)
@@ -3758,23 +3758,27 @@
  Check for POSIX group ACLs. If none use stat entry.
 /
 
-static int check_posix_acl_group_write(connection_struct *conn, const char 
*dname, SMB_STRUCT_STAT *psbuf)
+static int check_posix_acl_group_write(connection_struct *conn, const char 
*fname, SMB_STRUCT_STAT *psbuf)
 {
extern struct current_user current_user;
SMB_ACL_T posix_acl = NULL;
int entry_id = SMB_ACL_FIRST_ENTRY;
SMB_ACL_ENTRY_T entry;
int i;
+   BOOL seen_mask = False;
int ret = -1;
 
-   if ((posix_acl = SMB_VFS_SYS_ACL_GET_FILE(conn, dname, 
SMB_ACL_TYPE_ACCESS)) == NULL) {
+   if ((posix_acl = SMB_VFS_SYS_ACL_GET_FILE(conn, fname, 
SMB_ACL_TYPE_ACCESS)) == NULL) {
goto check_stat;
}
 
/* First ensure the group mask allows group read. */
+   /* Also check any user entries (these take preference over group). */
+
while ( SMB_VFS_SYS_ACL_GET_ENTRY(conn, posix_acl, entry_id, entry) == 
1) {
SMB_ACL_TAG_T tagtype;
SMB_ACL_PERMSET_T permset;
+   int have_write = -1;
 
/* get_next... */
if (entry_id == SMB_ACL_FIRST_ENTRY)
@@ -3788,20 +3792,51 @@
goto check_stat;
}
 
+   have_write = SMB_VFS_SYS_ACL_GET_PERM(conn, permset, 
SMB_ACL_WRITE);
+   if (have_write == -1) {
+   goto check_stat;
+   }
+
switch(tagtype) {
case SMB_ACL_MASK:
-   if (!SMB_VFS_SYS_ACL_GET_PERM(conn, permset, 
SMB_ACL_WRITE)) {
-   /* We don't have group write 
permission. */
+   if (!have_write) {
+   /* We don't have any group or explicit 
user write permission. */
ret = -1; /* Allow caller to check 
other permissions. */
+   DEBUG(10,(check_posix_acl_group_write: 
file %s \
+refusing write due to mask.\n, fname));
goto done;
}
+   seen_mask = True;
break;
+   case SMB_ACL_USER:
+   {
+   /* Check against current_user.uid. */
+   uid_t *puid = (uid_t 
*)SMB_VFS_SYS_ACL_GET_QUALIFIER(conn, entry);
+   if (puid == NULL) {
+   goto check_stat;
+   }
+   if (current_user.uid == *puid) {
+   /* We have a uid match but we must 
ensure we have seen the acl mask. */
+   ret = have_write;
+  

<    1   2   3   4   5   6   7   8   9   10   >