Hello all,

I've googled this but couldn't find anything relevant and the list's archives didn't turn anything either, so pretty please someone take a look at this if you can spare a moment.

My Samba server shares its CUPS printer, but Windows clients cannot print to it (I haven't tried other CIFS clients). I have the point-n-print driver all set up, so the Windows XP Pro clients can automatically detect this printer and load the driver (I'm also able to set the server default settings so the devmode is OK). But once the printer is set up in the Windows client, the test page doesn't print. The Windows driver says there's a communication problem with the printer, and looking at logfiles and traffic captures I see the problem is that the client is trying to do an NTCreate_and_X operation to open a named pipe called "\epmapper" but Samba answers with an NT_STATUS_OBJECT_NAME_NOT_FOUND message. The client retries this operation a couple of times and then gives up.

I'm testing this by connecting to the server from a non-domain-member machine, but by manually setting the correct username and password with the "net use \\myserver /user:muserver\myprinteradminusername itspass" command on a Windows command-line. The client and the server are both on the same Workgroup. In case you're wondering, my /var/spool/samba directory exists and has mode 1777.

Here's a level 10 log (only the interesting part; ask if you need all of it):
-----------------------
[2008/04/29 02:30:04, 10] lib/util.c:dump_data(2264)
 [000] 00 5C 00 65 00 70 00 6D  00 61 00 70 00 70 00 65  .\.e.p.m .a.p.p.e
 [010] 00 72 00 00 00                                    .r...
[2008/04/29 02:30:04, 3] smbd/process.c:switch_message(926)
 switch message SMBntcreateX (pid 16016) conn 0x555555c09660
[2008/04/29 02:30:04, 4] smbd/uid.c:change_to_user(183)
 change_to_user: Skipping user change - already user
[2008/04/29 02:30:04, 10] smbd/nttrans.c:reply_ntcreate_and_X(515)
reply_ntcreate_and_X: flags = 0x16, access_mask = 0x2019f file_attributes = 0x0, share_access = 0x3, create_disposition = 0x1 create_options = 0x40 root_dir_fid = 0x0
[2008/04/29 02:30:04, 4] smbd/nttrans.c:nt_open_pipe(328)
 nt_open_pipe: Opening pipe \epmapper.
[2008/04/29 02:30:04, 3] smbd/error.c:error_packet_set(106)
error packet at smbd/nttrans.c(343) cmd=162 (SMBntcreateX) NT_STATUS_OBJECT_NAME_NOT_FOUND
-----------------------

Here's an strace of smbd (also abridged); notice that the real uid 501 corresponds to the one chosen by the "net use" command:

-----------------------
write(20, "[2008/04/29 02:35:56, 10] lib/util.c:dump_data(2264)\n", 53) = 53
geteuid()                               = 501
write(20, " [000] 00 5C 00 65 00 70 00 6D 00 61 00 70 00 70 00 65 .\\.e.p.m .a.p.p.e\n", 76) = 76
geteuid()                               = 501
write(20, " [010] 00 72 00 00 00 .r... \n", 65) = 65
stat("/etc/localtime", {st_mode=S_IFREG|0664, st_size=1882, ...}) = 0
geteuid()                               = 501
write(20, "[2008/04/29 02:35:56, 3] smbd/process.c:switch_message(926)\n", 60) = 60
geteuid()                               = 501
write(20, " switch message SMBntcreateX (pid 17224) conn 0x555555c094d0\n", 62) = 62
stat("/etc/localtime", {st_mode=S_IFREG|0664, st_size=1882, ...}) = 0
geteuid()                               = 501
write(20, "[2008/04/29 02:35:56, 4] smbd/uid.c:change_to_user(183)\n", 56) = 56
geteuid()                               = 501
write(20, " change_to_user: Skipping user change - already user\n", 54) = 54
stat("/etc/localtime", {st_mode=S_IFREG|0664, st_size=1882, ...}) = 0
geteuid()                               = 501
write(20, "[2008/04/29 02:35:56, 10] smbd/nttrans.c:reply_ntcreate_and_X(515)\n", 67) = 67
geteuid()                               = 501
write(20, " reply_ntcreate_and_X: flags = 0x16, access_mask = 0x2019f file_attributes = 0x0, share_access = 0x3, create_dispositio"..., 169) = 169
stat("/etc/localtime", {st_mode=S_IFREG|0664, st_size=1882, ...}) = 0
geteuid()                               = 501
write(20, "[2008/04/29 02:35:56, 4] smbd/nttrans.c:nt_open_pipe(328)\n", 58) = 58
geteuid()                               = 501
write(20, "  nt_open_pipe: Opening pipe \\epmapper.\n", 40) = 40
stat("/etc/localtime", {st_mode=S_IFREG|0664, st_size=1882, ...}) = 0
geteuid()                               = 501
write(20, "[2008/04/29 02:35:56, 3] smbd/error.c:error_packet_set(106)\n", 60) = 60
geteuid()                               = 501
write(20, " error packet at smbd/nttrans.c(343) cmd=162 (SMBntcreateX) NT_STATUS_OBJECT_NAME_NOT_FOUND\n", 93) = 93
-----------------------

Here's my smb.conf:
-----------------------
[global]
   workgroup = CASITA
   netbios name = RAINBOW
   server string = Samba Server
   security = USER
   encrypt passwords = Yes
   passdb backend = tdbsam
   domain master = Yes
   local master = Yes
   preferred master = Yes
   os level = 35
   guest account = sambaguest
   map to guest = Bad User
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
   dns proxy = No
   wins support = Yes
   name resolve order = wins lmhosts host bcast
   pid directory = /var/run/samba
   lock directory = /var/cache/samba
   max smbd processes = 30
   domain logons = Yes
   logon script = scripts\login.bat OR scripts\%U.bat
   logon path = \\%L\Profiles\%U
   logon drive = H:
   logon home = \\%L\%U\.9xprofile
   time server = Yes
   idmap uid = 15000-20000
   idmap gid = 15000-20000
   printing = cups
   load printers = No
   printcap name = cups
   cups options = "raw"
   log level = 10
   log file = /var/log/samba/log.%m
   max log size = 10000
   hosts allow = 192.168.1.0/24 127.0.0.0/8
   hosts deny = ALL
   unix password sync = No
   nt acl support = Yes

[printers]
   comment = All Printers
   printable = Yes
   path = /var/spool/samba
   browseable = No
   read only = Yes
   guest ok = No
   printer admin = root,@ntadmins
   valid users = @ntadmins, root

[LEXX1270]
   comment = "Lexmark X1270"
   path = /var/spool/samba
   printable = Yes
   browseable = Yes
   read only = Yes
   guest ok = No
   valid users = @ntadmins,root
[print$]
   comment = Point-n-Print Driver Download Area
   path = /opt/samba/shares/printdrivers
   browseable = No
   read only = Yes
   guest ok = No
   write list = @ntadmins, root
   valid users = @ntadmins, root
-----------------------

Please share some insight about what's going on here, because I'm stumped.

Thanks,

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

Reply via email to