[Samba] Hard time installing printers 3.4.8

Jack Downes jax at nwmt.us
Thu Sep 30 00:38:34 MDT 2010


Just to be sure it wasn't an ADS issue, I removed all the ADS stuff,
migrated to security=user, made sure root was valid and admin on the
print$ share, and got the identical error messages.  so... I'm not doing
something quite right with the filesystem, I see that, but could use a
pointer here.

thanks,
Jack

Jack Downes wrote:
> Hello, been googling this for a while.  Read GD's presentation on why
> printing is such a pain...
>
> Anyway, I'm using 3.4.8 on Freebsd 8.1  I've tried a few combinations
> - best luck is with 3.2.5, but I'd like to move forward a bit.
>
> So, I've got the ADS part working pretty good.  happy with how that's
> going.
>
> my problem is when I attempt to load printer drivers.  Everything
> looks good up to the very end, and then all of a sudden it says it
> can't load the driver as access is denied.
>
> Now, just for your information, my intent is not really to use this
> system as a printserver, but rather as a printer driver distribution
> system.  I'll be converting the printers to IPP shortly after they are
> installed - via a login script as I like IPP better for a variety of
> reasons.  However, the point-n-print thing is really hard to beat.
>
> So I've been poring through the logs generated by samba34, and I get
> to a point where it's telling me that the files it's either reading or
> writing are a symlink outside the share path.  And so, I think this is
> why it fails.  Here's the log file +- 100 lines around the error. 
> Hopefully that's enough output from the log.
>
> freecups# grep -A100 -B100 NT_STATUS_ACCESS_DENIED log.smbd
>   Checking operation #92 (type 92, layer 0)
>   Making operation type 92 opaque [module /[Default VFS]/]
>   Accepting operation type 92 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #93 (type 93, layer 0)
>   Making operation type 93 opaque [module /[Default VFS]/]
>   Accepting operation type 93 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #94 (type 94, layer 0)
>   Making operation type 94 opaque [module /[Default VFS]/]
>   Accepting operation type 94 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #95 (type 95, layer 0)
>   Making operation type 95 opaque [module /[Default VFS]/]
>   Accepting operation type 95 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #96 (type 96, layer 0)
>   Making operation type 96 opaque [module /[Default VFS]/]
>   Accepting operation type 96 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #97 (type 97, layer 0)
>   Making operation type 97 opaque [module /[Default VFS]/]
>   Accepting operation type 97 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #98 (type 98, layer 0)
>   Making operation type 98 opaque [module /[Default VFS]/]
>   Accepting operation type 98 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #99 (type 99, layer 0)
>   Making operation type 99 opaque [module /[Default VFS]/]
>   Accepting operation type 99 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #100 (type 100, layer 0)
>   Making operation type 100 opaque [module /[Default VFS]/]
>   Accepting operation type 100 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #101 (type 101, layer 0)
>   Making operation type 101 opaque [module /[Default VFS]/]
>   Accepting operation type 101 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #102 (type 102, layer 0)
>   Making operation type 102 opaque [module /[Default VFS]/]
>   Accepting operation type 102 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #103 (type 103, layer 0)
>   Making operation type 103 opaque [module /[Default VFS]/]
>   Accepting operation type 103 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #104 (type 104, layer 0)
>   Making operation type 104 opaque [module /[Default VFS]/]
>   Accepting operation type 104 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #105 (type 105, layer 0)
>   Making operation type 105 opaque [module /[Default VFS]/]
>   Accepting operation type 105 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #106 (type 106, layer 0)
>   Making operation type 106 opaque [module /[Default VFS]/]
>   Accepting operation type 106 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #107 (type 107, layer 0)
>   Making operation type 107 opaque [module /[Default VFS]/]
>   Accepting operation type 107 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #108 (type 108, layer 0)
>   Making operation type 108 opaque [module /[Default VFS]/]
>   Accepting operation type 108 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #109 (type 109, layer 0)
>   Making operation type 109 opaque [module /[Default VFS]/]
>   Accepting operation type 109 from module /[Default VFS]/
> [2010/09/29 17:31:53,  5] smbd/vfs.c:192(vfs_init_custom)
>   Checking operation #110 (type 110, layer 0)
>   Making operation type 110 opaque [module /[Default VFS]/]
>   Accepting operation type 110 from module /[Default VFS]/
> [2010/09/29 17:31:53, 10]
> modules/vfs_default.c:147(vfswrap_fs_capabilities)
>   vfswrap_fs_capabilities: timestamp resolution of msec available on
> share homes, directory /home/PrinterDrivers
> [2010/09/29 17:31:53,  4] smbd/vfs.c:753(vfs_ChDir)
>   vfs_ChDir to /home/PrinterDrivers
> [2010/09/29 17:31:53,  3] lib/util.c:788(unix_clean_name)
>   unix_clean_name [W32X86/PSCRIPT5.DLL]
> [2010/09/29 17:31:53,  5] smbd/filename.c:148(unix_convert)
>   unix_convert called on file "W32X86/PSCRIPT5.DLL"
> [2010/09/29 17:31:53, 10] smbd/statcache.c:235(stat_cache_lookup)
>   stat_cache_lookup: lookup failed for name [W32X86/PSCRIPT5.DLL]
> [2010/09/29 17:31:53, 10] smbd/statcache.c:274(stat_cache_lookup)
>   stat_cache_lookup: lookup succeeded for name [W32X86] -> [W32X86]
> [2010/09/29 17:31:53,  5] smbd/statcache.c:138(stat_cache_add)
>   stat_cache_add: Added entry (8038717d0:size 13) W32X86/PSCRIPT5.DLL
> -> W32X86/PSCRIPT5.DLL
> [2010/09/29 17:31:53,  5] smbd/filename.c:297(unix_convert)
>   conversion finished W32X86/PSCRIPT5.DLL -> W32X86/PSCRIPT5.DLL
> [2010/09/29 17:31:53, 10] smbd/open.c:3365(create_file_default)
>   create_file: access_mask = 0x120089 file_attributes = 0x80,
> share_access = 0x3, create_disposition = 0x1 create_options = 0x0
> oplock_request = 0x8 root_dir_fid = 0x0, ea_list = 0x0x0, sd = 0x0x0,
> create_file_flags = 0x0, fname = W32X86/PSCRIPT5.DLL
> [2010/09/29 17:31:53,  3] smbd/vfs.c:865(check_reduced_name)
>   reduce_name [W32X86/PSCRIPT5.DLL] [/home/PrinterDrivers]
> [2010/09/29 17:31:53, 10] smbd/vfs.c:937(check_reduced_name)
>   reduce_name realpath [W32X86/PSCRIPT5.DLL] ->
> [/usr/home/PrinterDrivers/W32X86/PSCRIPT5.DLL]
> [2010/09/29 17:31:53,  2] smbd/vfs.c:949(check_reduced_name)
>   reduce_name: Bad access attempt: W32X86/PSCRIPT5.DLL is a symlink
> outside the share path
> [2010/09/29 17:31:53,  5] smbd/filename.c:768(check_name)
>   check_name: name W32X86/PSCRIPT5.DLL failed with
> NT_STATUS_ACCESS_DENIED
> [2010/09/29 17:31:53, 10] smbd/open.c:3497(create_file_default)
>   create_file: NT_STATUS_ACCESS_DENIED
> [2010/09/29 17:31:53,  3]
> printing/nt_printing.c:1529(get_correct_cversion)
>   get_correct_cversion: Can't open file [W32X86/PSCRIPT5.DLL], errno = 0
> [2010/09/29 17:31:53,  4] smbd/vfs.c:753(vfs_ChDir)
>   vfs_ChDir to /tmp
> [2010/09/29 17:31:53,  1]
> ../librpc/ndr/ndr.c:251(ndr_print_function_debug)
>        spoolss_AddPrinterDriverEx: struct spoolss_AddPrinterDriverEx
>           out: struct spoolss_AddPrinterDriverEx
>               result                   : WERR_ACCESS_DENIED
> [2010/09/29 17:31:53,  5] rpc_server/srv_pipe.c:2362(api_rpcTNP)
>   api_rpcTNP: called \spoolss successfully
> [2010/09/29 17:31:53,  3]
> rpc_server/srv_pipe_hnd.c:343(free_pipe_context)
>   free_pipe_context: destroying talloc pool of size 0
> [2010/09/29 17:31:53, 10]
> rpc_server/srv_pipe_hnd.c:766(write_to_internal_pipe)
>   write_to_pipe: data_used = 604
> [2010/09/29 17:31:53, 10] lib/events.c:287(s3_event_debug)
>   s3_event: Schedule immediate event "tevent_req_trigger": 0x80387c890
> [2010/09/29 17:31:53, 10] lib/events.c:287(s3_event_debug)
>   s3_event: Run immediate event "tevent_req_trigger": 0x80387c890
> [2010/09/29 17:31:53,  6]
> rpc_server/srv_pipe_hnd.c:802(read_from_internal_pipe)
>    name: \spoolss len: 1204
> [2010/09/29 17:31:53, 10]
> rpc_server/srv_pipe_hnd.c:862(read_from_internal_pipe)
>   read_from_pipe: \spoolss: fault_state = 0 : data_sent_length = 0,
> prs_offset(&p->out_data.rdata) = 4.
> [2010/09/29 17:31:53,  5] rpc_parse/parse_prs.c:88(prs_debug)
>   000000 smb_io_rpc_hdr hdr
>       0000 major     : 05
>       0001 minor     : 00
>       0002 pkt_type  : 02
>       0003 flags     : 03
>       0004 pack_type0: 10
>       0005 pack_type1: 00
>       0006 pack_type2: 00
>       0007 pack_type3: 00
>       0008 frag_len  : 001c
>       000a auth_len  : 0000
>       000c call_id   : 00000136
> [2010/09/29 17:31:53,  5] rpc_parse/parse_prs.c:88(prs_debug)
>   000010 smb_io_rpc_hdr_resp resp
>       0010 alloc_hint: 00000004
>       0014 context_id: 0000
>       0016 cancel_ct : 00
>       0017 reserved  : 00
> [2010/09/29 17:31:53, 10] lib/events.c:287(s3_event_debug)
>   s3_event: Schedule immediate event "tevent_req_trigger": 0x803873ad0
> [2010/09/29 17:31:53, 10] lib/events.c:287(s3_event_debug)
>   s3_event: Run immediate event "tevent_req_trigger": 0x803873ad0
> [2010/09/29 17:31:53,  5] smbd/ipc.c:59(copy_trans_params_and_data)
>   copy_trans_params_and_data: params[0..0] data[0..28] (align 0)
> [2010/09/29 17:31:53,  5] lib/util.c:632(show_msg)
> [2010/09/29 17:31:53,  5] lib/util.c:642(show_msg)
>   size=84
>   smb_com=0x25
>   smb_rcls=0
>   smb_reh=0
>   smb_err=0
>   smb_flg=136
>   smb_flg2=51201
>   smb_tid=1
>   smb_pid=1312
>   smb_uid=101
>   smb_mid=14593
>   smt_wct=10
>   smb_vwv[ 0]=    0 (0x0)
>   smb_vwv[ 1]=   28 (0x1C)
>   smb_vwv[ 2]=    0 (0x0)
>   smb_vwv[ 3]=    0 (0x0)
>   smb_vwv[ 4]=   56 (0x38)
>   smb_vwv[ 5]=    0 (0x0)
>   smb_vwv[ 6]=   28 (0x1C)
>   smb_vwv[ 7]=   56 (0x38)
>   smb_vwv[ 8]=    0 (0x0)
>   smb_vwv[ 9]=    0 (0x0)
>   smb_bcc=29
> [2010/09/29 17:31:53, 10] ../lib/util/util.c:304(_dump_data)
>   [0000] 00 05 00 02 03 10 00 00   00 1C 00 00 00 36 01 00   ........
> .....6..
>   [0010] 00 04 00 00 00 00 00 00   00 05 00 00 00           ........
> .....
> [2010/09/29 17:31:53, 10]
> lib/util_sock.c:789(read_smb_length_return_keepalive)
>   got smb length of 41
> [2010/09/29 17:31:53,  6] smbd/process.c:1456(process_smb)
>   got message type 0x0 of len 0x29
> [2010/09/29 17:31:53,  3] smbd/process.c:1459(process_smb)
>   Transaction 1270 of length 45 (0 toread)
> [2010/09/29 17:31:53,  5] lib/util.c:632(show_msg)
> [2010/09/29 17:31:53,  5] lib/util.c:642(show_msg)
>   size=41
>   smb_com=0x4
>   smb_rcls=0
>   smb_reh=0
>   smb_err=0
>   smb_flg=24
>   smb_flg2=51207
>   smb_tid=4
>   smb_pid=65279
>   smb_uid=101
>   smb_mid=14657
>   smt_wct=3
>   smb_vwv[ 0]=10127 (0x278F)
>   smb_vwv[ 1]=65535 (0xFFFF)
>   smb_vwv[ 2]=65535 (0xFFFF)
>   smb_bcc=0
> [2010/09/29 17:31:53,  3] smbd/process.c:1273(switch_message)
>
>
> my smb.conf
> [global]
>
> log level = 10
> enable privileges = yes
> workgroup=KRH
> server string = %h server (Samba %v, Domain %D, Server %L - %R)
> load printers = yes
> printcap name = cups
> printing = cups
> addprinter command = /usr/local/sbin/smbaddprinter.pl
> deleteprinter command = /usr/local/sbin/smbdelprinter.pl
> encrypt passwords = yes
> socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
> dns proxy = no
> smb ports = 139
> security = ADS
> realm = KRH.INT
> follow symlinks = yes
> password server = kal-dc3.krh.int
> password server = kal-dc4.krh.int
> password server = kal-dc2.krh.int
> winbind separator = +
> idmap uid = 10000-20000
> idmap gid = 10000-20000
> winbind enum users = No
> winbind enum groups = No
> winbind nested groups = No
> template homedir = /home/%D/%U
> template shell = /bin/tcsh
> client ntlmv2 auth = yes
> winbind use default domain = yes
> restrict anonymous = 2
> domain master = no
> preferred master = no
> local master = no
> wins server = 10.6.1.21
> os level = 25
> disable netbios = no
> #character set = ISO8859-1
> #client code page = 850
>
>
> [homes]
> comment = PDF Directories
> valid users = %S
> #valid users = %U
> create mask = 0700
> directory mask = 0700
> read only = No
> browseable = no
>
> [printers]
> comment = All Printers
> path = /var/spool/samba34
> create mask = 0700
> browseable = no
> printable = yes
> guest ok = yes
> #
> [print$]
> comment = Printer Drivers
> path = /home/PrinterDrivers
> #valid users = KRH+jdown
> #admin users = KRH+jdown
> create mask = 0755
> directory mask = 0755
> read only = No
>



More information about the samba mailing list