[Samba] Overriding printer settings

2004-06-08 Thread Tom Alsberg
A question here - when using Samba with LPRng, Samba can get printer
information and settings from the printcap.  How can I then override
the settings (e.g. print command, or comment, or something else) of
one printer without having to specify all other settings too?

If I just specify a share for it, then it will ignore everything from
printcap, and I have to specify everything (even 'printable = yes').

  Thanks,
  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


adddriver RPC

2003-03-19 Thread Tom Alsberg
I am sending this again here, as I did not get any reply for some
time, and haven't yet figured it out by myself:

Hi there.

Leaving the idea of not providing driver files on the server for a
while (only specifying the name, as in my previous thread here), I was
trying the SPOOLSS adddriver RPC from rpcclient with Samba.

The server runs Samba 3.0 post-HEAD from CVS checked out on the 3rd of
March.  rpcclient is from the same version of Samba.

I went to try it with the HP LaserJet 5Si/5Si MX PS driver.

I put all the files in the print share at (\\dev\print$\w32x86).  The
files are from Windows XP Professional SP1.  The files are, as
reported by the printer test page:

pscript.ntf
pscript.hlp
ps5ui.dll
hplj5si1.ppd
pscript5.dll

I issued the following command from rpcclient:

adddriver Windows NT x86 HP LaserJet 5Si/5Si MX 
PS:pscript5.dll:hplj5si1.ppd:ps5ui.dll:pscript.hlp::pscript.ntf

At first it gave a segmentation fault, which should not happen.  I
assumed there is something wrong deeper than this, but anyway I traced
this to be a NULL pointer dereference of the return value of
get_driver_3_param.  After applying the following patch to
rpcclient/cmd_spoolss.c, just to get it not to seg-fault in that case
so I can get some more details:

--- cmd_spoolss.c.orig  Wed Mar 12 12:36:05 2003
+++ cmd_spoolss.c   Wed Mar 12 12:35:52 2003
@@ -1149,6 +1149,9 @@
 {
char*ptr;
 
+   if (!str)
+   return ;
+
/* get the next token */
ptr = strtok(str, delim);
-- END OF PATCH
 
So now it just gives:
result was NT_STATUS_UNSUCCESSFUL

Attached is a relevant snippet of the log file in debug level 4.  I
did not yet manage to figure out the problem from it.

Any idea what the trace to this problem is?

  Any help appreciated,
  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.
[2003/03/12 12:52:21, 3] ../source/auth/auth.c:check_ntlm_password(192)
  check_ntlm_password:  Checking password for unmapped user [EMAIL PROTECTED] with the 
new password interface
[2003/03/12 12:52:21, 3] ../source/auth/auth.c:check_ntlm_password(195)
  check_ntlm_password:  mapped user is: [EMAIL PROTECTED]
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2003/03/12 12:52:21, 3] ../source/smbd/uid.c:push_conn_ctx(287)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/03/12 12:52:21, 4] ../source/auth/auth_sam.c:sam_account_ok(321)
  sam_account_ok: Checking SMB password for user alsbergt
[2003/03/12 12:52:21, 3] ../source/auth/auth_sam.c:sam_password_ok(177)
  sam_password_ok: NO NT password stored for user alsbergt.
[2003/03/12 12:52:21, 3] ../source/auth/auth_sam.c:sam_password_ok(240)
  sam_password_ok: NO LanMan password set for user alsbergt (and no NT password 
supplied)
[2003/03/12 12:52:21, 4] ../source/auth/auth_sam.c:sam_password_ok(254)
  sam_password_ok: LM password check failed for user, no NT password alsbergt
[2003/03/12 12:52:21, 3] ../source/auth/auth_idng.c:check_idng_security(138)
  check_idng_security called: user=alsbergt (alsbergt), auth succeeded
[2003/03/12 12:52:21, 3] ../source/smbd/uid.c:fetch_sid_from_gid_cache(654)
  fetch sid from gid cache 6 - S-1-5-21-2763996366-3983801899-2901956018-1013
[2003/03/12 12:52:21, 3] ../source/auth/auth.c:check_ntlm_password(229)
  check_ntlm_password: idng authentication for user [alsbergt] suceeded
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2003/03/12 12:52:21, 3] ../source/smbd/uid.c:push_conn_ctx(287)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/03/12 12:52:21, 2] ../source/auth/auth.c:check_ntlm_password(270)
  check_ntlm_password:  authentication for user [alsbergt] - [alsbergt] - [alsbergt] 
suceeded
[2003/03/12 12:52:21, 3] ../source/smbd/password.c:register_vuid(198)
  User name: alsbergt   Real name: Tom Alsberg
[2003/03/12 12:52:21, 3] ../source/smbd/password.c:register_vuid(216)
  UNIX uid 3228 is UNIX user alsbergt, and will be vuid 100
[2003/03/12 12:52:21, 3] ../source/smbd/password.c:register_vuid(232)
  Adding/updating homes service for user 'alsbergt' using home direcotry: 
'/cs/system/alsbergt'
[2003/03/12 12:52:21, 3] ../source/param/loadparm.c:lp_add_home(2227)
  adding home's share [alsbergt] for user 'alsbergt

Re: adddriver RPC

2003-03-19 Thread Tom Alsberg
Hi there.
Thank you for your reply.  Please read my comments below:

On Wed, Mar 19, 2003 at 10:43:14AM +, Ronan Waide wrote:
 snip /
 The adddriver rpc expects to find the files in \\dev\print$; it will
 move them to the w32x86 or win40 directory as appropriate.

Firstly, you first said that it expects the files in the w32x86/win40
directories.

 If you look
 through your trace you'll find an error indicating that samba was
 unable to obtain the cversion of one of the files due to a file not
 found error.

Now, I did that, and got the practically the same log messages.
Notice the relevant message I assume you were referring to (cannot
obtain the cversion of one of the files):

[2003/03/12 12:52:25, 3] ../source/printing/nt_printing.c:get_correct_cversion(1130)
  get_correct_cversion: Can't open file [w32x86], errno = 21

It says that it cannot open the 'w32x86' file, in both cases (putting
the files in \print$ or in \print$\w32x86).  Errno 21.  That is on
this system (FreeBSD 4.7):

#define EISDIR  21  /* Is a directory */

So it tries to open it as a regular (data) file.  What is that for?
What should be in it?  I tried creating it as an empty file, just to
see what happens, and it then complains the same about [W32X86] (in
uppercase).

  Thanks, any further help appreciated,
  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.


adddriver RPC

2003-03-12 Thread Tom Alsberg
Hi there.

Leaving the idea of not providing driver files on the server for a
while (only specifying the name, as in my previous thread here), I was
trying the SPOOLSS adddriver RPC from rpcclient with Samba.

The server runs Samba 3.0 post-HEAD from CVS checked out on the 3rd of
March.  rpcclient is from the same version of Samba.

I went to try it with the HP LaserJet 5Si/5Si MX PS driver.

I put all the files in the print share at (\\dev\print$\w32x86).  The
files are from Windows XP Professional SP1.  The files are, as
reported by the printer test page:

pscript.ntf
pscript.hlp
ps5ui.dll
hplj5si1.ppd
pscript5.dll

I issued the following command from rpcclient:

adddriver Windows NT x86 HP LaserJet 5Si/5Si MX 
PS:pscript5.dll:hplj5si1.ppd:ps5ui.dll:pscript.hlp::pscript.ntf

At first it gave a segmentation fault, which should not happen.  I
assumed there is something wrong deeper than this, but anyway I traced
this to be a NULL pointer dereference of the return value of
get_driver_3_param.  After applying the following patch to
rpcclient/cmd_spoolss.c, just to get it not to seg-fault in that case
so I can get some more details:

--- cmd_spoolss.c.orig  Wed Mar 12 12:36:05 2003
+++ cmd_spoolss.c   Wed Mar 12 12:35:52 2003
@@ -1149,6 +1149,9 @@
 {
char*ptr;
 
+   if (!str)
+   return ;
+
/* get the next token */
ptr = strtok(str, delim);
-- END OF PATCH
 
So now it just gives:
result was NT_STATUS_UNSUCCESSFUL

Attached is a relevant snippet of the log file in debug level 4.  I
did not yet manage to figure out the problem from it.

Any idea what the trace to this problem is?

  Any help appreciated,
  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.
[2003/03/12 12:52:21, 3] ../source/auth/auth.c:check_ntlm_password(192)
  check_ntlm_password:  Checking password for unmapped user [EMAIL PROTECTED] with the 
new password interface
[2003/03/12 12:52:21, 3] ../source/auth/auth.c:check_ntlm_password(195)
  check_ntlm_password:  mapped user is: [EMAIL PROTECTED]
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2003/03/12 12:52:21, 3] ../source/smbd/uid.c:push_conn_ctx(287)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/03/12 12:52:21, 4] ../source/auth/auth_sam.c:sam_account_ok(321)
  sam_account_ok: Checking SMB password for user alsbergt
[2003/03/12 12:52:21, 3] ../source/auth/auth_sam.c:sam_password_ok(177)
  sam_password_ok: NO NT password stored for user alsbergt.
[2003/03/12 12:52:21, 3] ../source/auth/auth_sam.c:sam_password_ok(240)
  sam_password_ok: NO LanMan password set for user alsbergt (and no NT password 
supplied)
[2003/03/12 12:52:21, 4] ../source/auth/auth_sam.c:sam_password_ok(254)
  sam_password_ok: LM password check failed for user, no NT password alsbergt
[2003/03/12 12:52:21, 3] ../source/auth/auth_idng.c:check_idng_security(138)
  check_idng_security called: user=alsbergt (alsbergt), auth succeeded
[2003/03/12 12:52:21, 3] ../source/smbd/uid.c:fetch_sid_from_gid_cache(654)
  fetch sid from gid cache 6 - S-1-5-21-2763996366-3983801899-2901956018-1013
[2003/03/12 12:52:21, 3] ../source/auth/auth.c:check_ntlm_password(229)
  check_ntlm_password: idng authentication for user [alsbergt] suceeded
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2003/03/12 12:52:21, 3] ../source/smbd/uid.c:push_conn_ctx(287)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2003/03/12 12:52:21, 3] ../source/smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/03/12 12:52:21, 2] ../source/auth/auth.c:check_ntlm_password(270)
  check_ntlm_password:  authentication for user [alsbergt] - [alsbergt] - [alsbergt] 
suceeded
[2003/03/12 12:52:21, 3] ../source/smbd/password.c:register_vuid(198)
  User name: alsbergt   Real name: Tom Alsberg
[2003/03/12 12:52:21, 3] ../source/smbd/password.c:register_vuid(216)
  UNIX uid 3228 is UNIX user alsbergt, and will be vuid 100
[2003/03/12 12:52:21, 3] ../source/smbd/password.c:register_vuid(232)
  Adding/updating homes service for user 'alsbergt' using home direcotry: 
'/cs/system/alsbergt'
[2003/03/12 12:52:21, 3] ../source/param/loadparm.c:lp_add_home(2227)
  adding home's share [alsbergt] for user 'alsbergt' at '/cs/system/alsbergt'
[2003/03/12 12:52:21, 3] ../source/smbd/process.c:process_smb(882)
  Transaction 3 of length

Re: Printer driver parameter deprecated - what now?

2003-03-10 Thread Tom Alsberg
Hi there.
Please read my comments below:

On Sun, Mar 09, 2003 at 04:07:57PM +, Ronan Waide wrote:
 On March 9, [EMAIL PROTECTED] said:
  snip /
  Well, I tried that, does not work, I get:
  
  SetPrinter call failed!
  result was NT_STATUS_UNSUCCESSFUL
 
 setdriver expects the following setup:
 * you are a printer admin, or root.

I am both defined as a printer admin and am in the write list of the
[print$] share in smb.conf.

   - this is the smb.conf printer admin group, not the Printer
 Operators group in NT. I've not tried the latter, but I don't
 believe it will work based on the current code.

Uh...  How can Samba users be members of NT groups?  I did not know
Samba supports that...  How do you add Unix users to NT groups for
Samba?

 * printer admins has to be defined in [global]

Is defined there.

 * upload the driver files to \\server\print$\w32x86 and win40 as
   appropriate. DON'T put them in the 0 or 2 subdirectories.

Uh.  No driver files yet...  As I said in the original message, right
now I do not want any driver files on the server - I only want the
server to specify the name of the driver that the client can use
(equivalent to the deprecated 'printer driver' option in smb.conf).

 * Make sure that the user you're connecting as is able to write to the
   print$ directories

I am.

 * Use adddriver (with appropriate parameters) to create the driver
   - note, this will not just update samba's notion of drivers, it will
 also move the files from the w32x86 and win40 directories to an
 appropriate subdirectory (based on driver version, I think, but
 not important enough for me to find out)

Again, I do not want to store any drivers on the server right now -
only specify their names.

 * Use setdriver to associate the driver with a printer

That's what I tried.

 The setdriver call will fail if the printer doesn't already exist in
 samba's view of the world. Either create the printer in cups and
 restart samba, or create an add printer command (see smb.conf doco)
 and use RPC calls to create a printer.

Uh?  What's wrong with just having a printer share defined for it
already?

 NB the add printer command MUST return a single line of text
 indicating which port the printer was added on. If it doesn't, Samba
 won't reload the printer definitions. Although samba doesn't really
 support the notion of ports, suitable add printer command and
 enumport command settings can allow you pretty good remote control
 of the samba printer setup.

I do not use any 'add printer command'.  All printers are added to the
smb.conf and installed on the server manually (by me).

 Hope this helps you somewhat.

Well, to be honest, it just confused me a bit more.  But I will try to
look some of this up and might learn a bit better how this should
work, improving my conception of it.

Yet, my problem remains unsolved.

  Thank you, any further help appreciated,
  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.


Printer driver parameter deprecated - what now?

2003-03-09 Thread Tom Alsberg
Hi there.

I wanted long already to get into automatic determination and
downloading of printer drivers for Windows.  I notice now that the
'printer driver' parameter is specified as deprecated in the manual
page of smb.conf (was long already so, probably, but only now I really
checked exactly).  It says there to check the Samba Printing HOWTO for
more information.

Firstly, I did not really find the Samba Printing HOWTO - I assume
this is [Chapter 13. Printing Support] in the Samba HOWTO Collection
(docs/Samba-HOWTO-Collection.pdf - Samba Project Documentation).

So I read that.  Seems pretty much appropriate as a replacement for
the printer driver file option.  But, what if for now I just want to
specify the name of the printer driver to use for the printer, and not
provide the files themselves (assuming the client has it installed
already, e.g. it came with Windows).  That appears what the printer
driver parameter should do, but I could not really find anything of
that functionality (or simplicity) with the [print$] share system.

So - what is the updated replacement for the printer driver
parameter - say, what would be equivalent to setting:

printer driver = HP LaserJet 4L

like in the example of the man page?

Also, I did not really understand what section 13.2 in the document
([print$] vs. [printer$]) is supposed to mean - there only [printer$]
is mentioned, while in the rest of the document only [print$] is
mentioned.

  Thanks, any answers appreciated,
  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.


Re: Printer driver parameter deprecated - what now?

2003-03-09 Thread Tom Alsberg
On Sun, Mar 09, 2003 at 03:21:00PM +0100, Jelmer Vernooij wrote:
 On Sun, Mar 09, 2003 at 01:27:50PM +0200, Tom Alsberg wrote about 'Printer driver 
 parameter deprecated - what now?':
  snip /
 
 I think that would be the 'setdriver' command from rpcclient - Tim,
 does that sound correct? 

Uhmm...  I'm not sure.  So what do I do - create the share, create
empty directories like 'w32x86' and 'win40' and then issue a setdriver
RPC?

 Maybe we should have some more user-friendly option?

Might be helpful...  An parameter for the printer share in smb.conf
seems like the proper way to me.

  Also, I did not really understand what section 13.2 in the document
  ([print$] vs. [printer$]) is supposed to mean - there only [printer$]
  is mentioned, while in the rest of the document only [print$] is
  mentioned.
 The printer docs still need some updating - afaik the current doc only
 applies to lprng.

Uh...  Well, I do not see to many things specific to lprng there...
Here the lpr system is not too standard right now, so until I'll get
to put some interface to it in the printing code of Samba (or, for
that matter, when we switch to lprng or something else modern), I
define all the printer shares in smb.conf.

 Jelmer

  Thanks,
  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.


Re: Printer driver parameter deprecated - what now?

2003-03-09 Thread Tom Alsberg
On Sun, Mar 09, 2003 at 04:26:58PM +0200, Tom Alsberg wrote:
 On Sun, Mar 09, 2003 at 03:21:00PM +0100, Jelmer Vernooij wrote:
  I think that would be the 'setdriver' command from rpcclient - Tim,
  does that sound correct? 
 
 Uhmm...  I'm not sure.  So what do I do - create the share, create
 empty directories like 'w32x86' and 'win40' and then issue a setdriver
 RPC?

Well, I tried that, does not work, I get:

SetPrinter call failed!
result was NT_STATUS_UNSUCCESSFUL

I set my self in printer admin and in the write list of the [print$]
share.

By the way, amongst other things, while doing so in the server log I
see this:

[2003/03/09 16:56:38, 0] ../source/printing/print_cups.c:cups_queue_get(832)
  Unable to connect to CUPS server localhost - Connection refused

But I have 'printing = bsd' in smb.conf...

Why does it try to connect to a CUPS server?

  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.


Anonymous domain joining

2003-03-04 Thread Tom Alsberg
Hi there.

I am trying to achieve something that will let any machine be a member
of the domain, without needing authentication as an admin to join.

The basic idea is that all machines will be in the domain in the
server's opinion, and joining it will be necessary only for Windows to
know it is in the domain.

So the first thing I want is joining the domain anonymously.

What I ultimately strive to is that Samba will have to keep no state
or information about machines in the domain - so that a machine
joining will get a positive reply from Samba, but no real state will
change at the server, at least not on disk.

I definitely do not want separate local accounts (/etc/passwd), or for
that matter any Unix accounts for machines in the domain.

So, right now we have a few ugly source hacks, as well as some script
that is called and keeps some state.  I am hoping for a cleaner
solution.  I am working on the Samba sources to achieve this, but I
would love any advice on how to do it with as little source
modifications as possible.

Any advice, then?

  Thanks, any help appreciated,
  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.


Re: Anonymous domain joining

2003-03-04 Thread Tom Alsberg
Just a few notes I forgot - this is with Windows NT, 2000, and XP
clients, and I am working on the post-3.0-HEAD branch.

  -- Tom

On Tue, Mar 04, 2003 at 03:32:24PM +0200, Tom Alsberg wrote:
 Hi there.
 
 I am trying to achieve something that will let any machine be a member
 of the domain, without needing authentication as an admin to join.
 snip /...

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.


Re: ports in samba

2003-02-26 Thread Tom Alsberg
On Wed, Feb 26, 2003 at 04:23:45AM -0800, D Jemms wrote:
 snip /
 What is the difference between two ports on which 
 samba listens for TCP 139 and 445.

Ports 137-139 serve SMB over NetBIOS over TCP/IP.  This is the transport
used by LANMAN versions before Windows 2000 (Windows 3.x, NT 3.x,
NT 4.x, Windows 95/98/Me, etc.).  Port 445 is Microsoft's direct SMB
over TCP (no NetBIOS in the middle) the preferred method for
Windows 2000 and XP - should be a cleaner way to work with, but I do not
know it well yet...

Correct me if I had any mistake here.

  -- Tom

-- 
  Tom Alsberg - hacker (being the best description fitting this space)
  Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER:  The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.


Signal 11 (SEGV - Segmentation Fault) after tdb_unpack

2003-02-17 Thread Tom Alsberg
I recently newly built Samba 3.0 from CVS, and tried it.
I have a problem with it.  On connection to it - that is, when giving
the password, the connection terminates
In the log file for the machine, after a few things like:

  tdb_unpack(ddffd, 23) - 19
[2003/02/17 12:06:05, 18] ../source/tdb/tdbutil.c:tdb_unpack(558)
  tdb_unpack(d, 4) - 4
[2003/02/17 12:06:05, 18] ../source/tdb/tdbutil.c:tdb_unpack(558)
  tdb_unpack(ddffd, 30) - 26
[2003/02/17 12:06:05, 18] ../source/tdb/tdbutil.c:tdb_unpack(558)
  tdb_unpack(d, 4) - 4

I have:

[2003/02/17 12:06:05, 0] ../source/lib/fault.c:fault_report(36)
  ===
[2003/02/17 12:06:05, 0] ../source/lib/fault.c:fault_report(37)
  INTERNAL ERROR: Signal 11 in pid 49179 (post3.0-HEAD)
  Please read the file BUGS.txt in the distribution
[2003/02/17 12:06:05, 0] ../source/lib/fault.c:fault_report(39)
  ===
[2003/02/17 12:06:05, 0] ../source/lib/util.c:smb_panic(1415)
  PANIC: internal error

A problem it is.
That is when trying to connect to a share, both with Windows and
smbclient, after giving the password.

The source is slightly patched - with an auth module and a passdb
module added, but it used to work previously with the same
modifications, and it does not seem related.

I don't know what exactly other information would help, I cannot
really guess a direction, except the tdb routines, which seem to be
fine.

A BUGS.txt file does not seem to exist.

Will somewhen go into deeper debugging of it, but I wondered if anyone
has any idea...


  Thank you, any help appreciated,
  -- Tom

-- 
A man on a boat...
A cat on a train.
He's clearing his throat...
She's smearing a stain.




Session Setup (AndX) on workgroup browsing

2002-08-29 Thread Tom Alsberg

Hi there.
I wonder, why does a SMB/CIFS client need to perform a session setup
just to see the list of machines in a workgroup?
I am having some problems with tracing some CIFS code, and at least
Windows XP clients seem to try to do a session setup when just
double-clicking on the name of a workgroup (which happens to be a
domain too) in Network Neighbourhood / Entire Network...

  Thanks,
  -- Tom

-- 
  Tom Alsberg
Hebrew University of Jerusalem, Israel,
Institute of Computer Science and Engineering -
System Group / Computer Vision Lab



name_type values in struct nmb_name

2002-08-27 Thread Tom Alsberg

Hi there.
Sorry if I missed a few things, I am not yet experienced and
understanding enough of all the details in that mess - CIFS.

A question I have now - in name query requests, there is in the struct
nmb_name a field/member:
  unsigned int name_type;
Assumably this indicates something about the type/purpose of
request/name being resolved, and type of reply requested.

What are those types? I mean, what valid values can the name_type
field have, and what are their meanings? Is there some table of the
possible values / name types somewhere? Or are they defined in some
enum or struct (which I could not seem to find) - then where?

Sorry for the partial ignorance, I have a lot more questions and
unclear matters I am still trying to figure out.

  Thanks, any help/answer appreciated,
  -- Tom

-- 
  Tom Alsberg
Hebrew University of Jerusalem, Israel,
Institute of Computer Science and Engineering -
System Group / Computer Vision Lab



Re: name_type values in struct nmb_name

2002-08-27 Thread Tom Alsberg

Hi there.
Comments below:

On Tue, Aug 27, 2002 at 09:14:11AM -0500, Gerald (Jerry) Carter wrote:
 On Tue, 27 Aug 2002, Tom Alsberg wrote:
  snip /
  What are those types? I mean, what valid values can the name_type
  field have, and what are their meanings? Is there some table of the
  possible values / name types somewhere? Or are they defined in some
  enum or struct (which I could not seem to find) - then where?
 
 Resource byte (e.g. 0x20 - server resource point, 0x1b - domain 
 master browser, 0x1c - logon server, etc...)

Yes, I know that... But, those are not the only types, and I don't
understand them fully (e.g. what exactly is a server resource
point?). Is there somewhere a list of all the possible values (Name
types (name_type)) and their meaning?.

Perhaps some explanations on those types would also be good...

 cheers, jerry

  Thanks,
  -- Tom

-- 
  Tom Alsberg
Hebrew University of Jerusalem, Israel,
Institute of Computer Science and Engineering -
System Group / Computer Vision Lab



Windows XP name lookup when joining a domain

2002-08-15 Thread Tom Alsberg

Hi there.
I am recently working on debugging some changes we made to Samba at
our site. Pretty much everything is working now - printing (with and
without MS-RPC [SPOOLSS]), directory shares, user mapping...
I am now into getting it to work as a domain controller for Windows NT
4.0, Windows 2000, and Windows XP clients.

A few days ago, something weird happened. While testing some things
with some Windows XP clients, some-when all clients stopped finding
and being able to contact the domain controller for the domain.
Nothing seems to have changed at that time, except the log level of
smbd and nmbd (from 4 to 10). I tried changing it back just to be
sure, but that's not the cause.

Joining the domain didn't work for other reasons previously I was
working on fixing... But now somehow the Windows clients have another
problem, which I have not been able to figure out by now.

When trying to join the domain DEVIL, whose domain controller is DEV,
running Samba 3.0-alpha, by the Windows XP Professional client GX-100,
Windows XP gives a message that the domain controller could not be
contacted.
In addition, it gives the following diagnostics message:

snip
  The domain name devil might be a NetBIOS domain name.  If this is the
  case, verify that the domain name is properly registered with WINS. 

  If you are certain that the name is not a NetBIOS domain name, then
  the following information can help you troubleshoot your DNS
  configuration. 

  The following error occurred when DNS was queried for the service
  location (SRV) resource record used to locate a domain controller for
  domain devil: 

  The error was: DNS name does not exist.
  (error code 0x232B RCODE_NAME_ERROR)

  The query was for the SRV record for _ldap._tcp.dc._msdcs.devil

  Common causes of this error include the following:

  - The DNS SRV record is not registered in DNS.

  - One or more of the following zones do not include delegation to its
  child zone:

  devil
  . (the root zone)

  For information about correcting this problem, click Help.
/snip

According to this diagnostics message, it seems like Windows XP is
trying to locate the domain DEVIL in DNS... But that shouldn't be so,
it is a domain in NetBIOS/WINS (nmbd knows about it)... I also tried
setting in the WINS configuration for the connection that machine
(dev) as the WINS server, but that does not seem to help.
The domain is in WINS, and visible in NetBIOS, according to
nmblookup. Also browsing the workgroup usually works, and browsing
shares, etc. in the server works fine.

Also, it doesn't really look for it in DNS. I tried taking network
(packet) dumps (with Microsoft NetMon and tcpdump), as well as logging
all DNS queries on the name servers, and that does not seem to be so.

According to the network dumps, the Windows XP client does try to look
up the domain DEVIL, with three identical NetBIOS Name Service (NBNS)
requests to the server DEV (probably because I set it as the WINS
server), and three identical requests to the broadcast address. It
doesn't seem to get any reply.
The client does not contact smbd during that.

Any idea what the problem might be? What could have changed? How I can
check it further? What could the reason nmbd suddenly sends no replies
be?

I can provide network (packet) dumps and server logs, if those will be
of use (but I don't see any additional relevant information there).

  Thanks, any help appreciated,
  -- Tom

-- 
  Tom Alsberg
Hebrew University of Jerusalem, Israel,
Institute of Computer Science and Engineering -
System Group / Computer Vision Lab