[Samba] cupsaddsmb rpcclient error

Daniel T. Gynn dan.gynn at essensys.com
Wed Oct 23 14:01:08 GMT 2002


I am running samba 2.2.6 and cups 1.1.16.  I can't get cupsaddsmb to
complete successfully.  I'm at an end here, I can't think of anything
else to try after 2 weeks of searching the web.  It copies the drivers
to the print$ share directory, however the SetPrinter command fails on
the rpcclient command and it returns with an NT_STATUS_UNSUCCESSFUL
error.  At the SetPrinter failure, it returns an WERR_ACCESS_DENIED, but
I'm not sure what permissions it's looking for or where it wants them
set.  I'm attaching the results of rpcclient with debug level 100.

PS I'm snipping alot of this since it seems like the list won't allow 
long emails.  You can see the whole log at 
http://www.essensys.com/~dan/rpcclient.txt


Serverzone is 14400
[snip]
Initialising global parameters
params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
Processing section "[global]"
doing parameter workgroup = LIMBACH
doing parameter netbios name = LFSPITPDC
handle_netbios_name: set global_myname to: LFSPITPDC
doing parameter server string = LFS Samba Server
doing parameter encrypt passwords = Yes
doing parameter obey pam restrictions = Yes
doing parameter pam password change = Yes
doing parameter passwd program = /usr/bin/passwd %u
doing parameter passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
doing parameter unix password sync = Yes
doing parameter log file = /var/log/samba/%m.log
doing parameter max log size = 0
doing parameter time server = Yes
doing parameter socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
doing parameter addprinter command = /usr/sbin/cupsaddsmb
doing parameter domain admin group = ntadmin
doing parameter add user script = /usr/local/bin/newMachine.sh %u
doing parameter logon path = \\172.24.150.210\profiles\%U
doing parameter logon drive = I:
doing parameter logon home = \\172.24.150.210\%U
doing parameter domain logons = Yes
doing parameter os level = 64
doing parameter preferred master = Yes
doing parameter domain master = Yes
doing parameter dns proxy = No
doing parameter wins server = 192.168.110.163
wins_srv_load_list(): Building WINS server list:
192.168.110.163,
1 WINS server listed.
doing parameter ldap port = 389
doing parameter ldap suffix = "ou=smb, o=limbach, c=us"
doing parameter ldap admin dn = "uid=manager, o=limbach, c=us"
doing parameter ldap ssl = no
doing parameter admin users = @ntadmin
doing parameter printer admin = @ntadmin
doing parameter hosts allow = 172.24.150. 172.24.151. 127.0.0.1 172.29.175. 172.24.155. 172.24.154. 172.29.140.
doing parameter printcap name = /etc/printcap
doing parameter printing = cups
doing parameter print command = /usr/bin/lpr -r -P%p %s
doing parameter lpq command = /usr/bin/lpq -P%p
doing parameter lprm command = /usr/bin/lprm -P%p %j
pm_process() returned Yes
lp_servicenumber: couldn't find homes
set_server_role: ROLE_DOMAIN_PDC
codepage_initialise: client code page = 850
load_client_codepage: loading codepage 850.
[snip]
load_dos_unicode_map: 850
load_unicode_map: loading unicode map for codepage 850.
load_unix_unicode_map: ISO8859-1 (init_done=0, override=0)
load_unicode_map: loading unicode map for codepage ISO8859-1.
added interface ip=172.24.150.210 bcast=172.24.151.255 nmask=255.255.254.0
resolve_lmhosts: Attempting lmhosts lookup for name localhost<0x20>
getlmhostsent: lmhost entry: 127.0.0.1 localhost 
internal_resolve_name: returning 1 addresses: 127.0.0.1 

Connecting to host=localhost share=IPC$
Connecting to 127.0.0.1 at port 445
error connecting to 127.0.0.1:445 (Connection refused)
Connecting to 127.0.0.1 at port 139

[snip]

000018 spoolss_io_r_getprinter 
    000018 spoolss_io_buffer 
        0018 ptr: 00000001
        001c size: 000001ac
    01cc needed: 000001ac
    01d0 status: WERR_OK
000000 smb_io_printer_info_2 
    0000 offset: 00000194
    000194 smb_io_unistr servername
    0004 offset: 00000168
    000168 smb_io_unistr printername
    0008 offset: 00000154
    000154 smb_io_unistr sharename
    000c offset: 0000012e
    00012e smb_io_unistr portname
    0010 offset: 0000012c
    00012c smb_io_unistr drivername
    0014 offset: 00000108
    000108 smb_io_unistr comment
    0018 offset: 00000106
    000106 smb_io_unistr location
    001c devmode: 00000000
    0020 offset: 00000104
    000104 smb_io_unistr sepfile
    0024 offset: 000000f2
    0000f2 smb_io_unistr printprocessor
    0028 offset: 000000ea
    0000ea smb_io_unistr datatype
    002c offset: 000000e8
    0000e8 smb_io_unistr parameters
    0030 sec_desc: 00000000
    00001c smb_io_reldevmode devmode
        001c offset: 00000000
    0034 attributes: 00000018
    0038 priority: 00000001
    003c defpriority: 00000001
    0040 starttime: 00000000
    0044 untiltime: 00000000
    0048 status: 00000000
    004c jobs: 00000000
    0050 averageppm: 00000000
000000 spoolss_io_q_setprinter 
    000000 smb_io_pol_hnd printer handle
        0000 data1: 00000000
        0004 data2: 00000002
        0008 data3: 0000
        000a data4: 0000
        000c data5: 46 b7 b5 3d 5b 0c 00 00 
    0014 level: 00000002
    000018 spool_io_printer_info_level 
        0018 level: 00000002
        001c info_ptr: 00000001
        000020 spool_io_printer_info_level_2 
            0020 servername_ptr: 00000001
            0024 printername_ptr: 00000001
            0028 sharename_ptr: 00000001
            002c portname_ptr: 00000001
            0030 drivername_ptr: 00000001
            0034 comment_ptr: 00000001
            0038 location_ptr: 00000000
            003c devmode_ptr: 00000000
            0040 sepfile_ptr: 00000000
            0044 printprocessor_ptr: 00000001
            0048 datatype_ptr: 00000001
            004c parameters_ptr: 00000000
            0050 secdesc_ptr: 00000000
            0054 attributes: 00000018
            0058 priority: 00000001
            005c default_priority: 00000001
            0060 starttime: 00000000
            0064 untiltime: 00000000
            0068 status: 00000000
            006c cjobs: 00000000
            0070 averageppm: 00000000
            000074 smb_io_unistr2 servername
                0074 uni_max_len: 0000000c
                0078 undoc      : 00000000
                007c uni_str_len: 0000000c
                0080 buffer     : \.\.l.o.c.a.l.h.o.s.t...
            000098 smb_io_unistr2 printername
                0098 uni_max_len: 00000016
                009c undoc      : 00000000
                00a0 uni_str_len: 00000016
                00a4 buffer     : \.\.l.o.c.a.l.h.o.s.t.\.b.u.s.i.n.e.s.s.4...
            0000d0 smb_io_unistr2 sharename
                00d0 uni_max_len: 0000000a
                00d4 undoc      : 00000000
                00d8 uni_str_len: 0000000a
                00dc buffer     : b.u.s.i.n.e.s.s.4...
            0000f0 smb_io_unistr2 portname
                00f0 uni_max_len: 00000013
                00f4 undoc      : 00000000
                00f8 uni_str_len: 00000013
                00fc buffer     : S.a.m.b.a. .P.r.i.n.t.e.r. .P.o.r.t...
            000122 smb_io_unistr2 drivername
                0124 uni_max_len: 0000000a
                0128 undoc      : 00000000
                012c uni_str_len: 0000000a
                0130 buffer     : b.u.s.i.n.e.s.s.4...
            000144 smb_io_unistr2 comment
                0144 uni_max_len: 00000012
                0148 undoc      : 00000000
                014c uni_str_len: 00000012
                0150 buffer     : H.P. .L.a.s.e.r.J.e.t. .4.0.0.0.n...
            000174 smb_io_unistr2 - NULL location
            000174 smb_io_unistr2 - NULL sepfile
            000174 smb_io_unistr2 printprocessor
                0174 uni_max_len: 00000009
                0178 undoc      : 00000000
                017c uni_str_len: 00000009
                0180 buffer     : w.i.n.p.r.i.n.t...
            000192 smb_io_unistr2 datatype
                0194 uni_max_len: 00000004
                0198 undoc      : 00000000
                019c uni_str_len: 00000004
                01a0 buffer     : R.A.W...
            0001a8 smb_io_unistr2 - NULL parameters
    0001a8 spoolss_io_devmode_cont 
        01a8 size: 00000000
        01ac devmode_ptr: 00000000
    0001b0 sec_io_desc_buf 
        01b0 size: 00000000
        01b4 ptr: 00000000
    01b8 command: 00000000
rpc_api_pipe_req: Outgoing data not a multiple of 8 bytes....
create_rpc_request: opnum: 0x7 data_len: 0x1d4
create_rpc_request: data_len: 1d4 auth_len: 0 alloc_hint: 1c4
000000 smb_io_rpc_hdr hdr    
    0000 major     : 05
    0001 minor     : 00
    0002 pkt_type  : 00
    0003 flags     : 03
    0004 pack_type0: 10
    0005 pack_type1: 00
    0006 pack_type2: 00
    0007 pack_type3: 00
    0008 frag_len  : 01d4
    000a auth_len  : 0000
    000c call_id   : 00000009
000010 smb_io_rpc_hdr_req hdr_req
    0010 alloc_hint: 000001c4
    0014 context_id: 0000
    0016 opnum     : 0007
data_len: 1d4 data_calc_len: 1d4
rpc_api_pipe: cmd:26 fnum:731e
[snip]
[000] 5C 50 49 50 45 5C 00 05  00 00 03 10 00 00 00 D4  \PIPE\.. ........
[010] 01 00 00 09 00 00 00 C4  01 00 00 00 00 07 00 00  ........ ........
[020] 00 00 00 02 00 00 00 00  00 00 00 46 B7 B5 3D 5B  ........ ...F..=[
[030] 0C 00 00 02 00 00 00 02  00 00 00 01 00 00 00 01  ........ ........
[040] 00 00 00 01 00 00 00 01  00 00 00 01 00 00 00 01  ........ ........
[050] 00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
[060] 00 00 00 01 00 00 00 01  00 00 00 00 00 00 00 00  ........ ........
[070] 00 00 00 18 00 00 00 01  00 00 00 01 00 00 00 00  ........ ........
[080] 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
[090] 00 00 00 0C 00 00 00 00  00 00 00 0C 00 00 00 5C  ........ .......\
[0A0] 00 5C 00 6C 00 6F 00 63  00 61 00 6C 00 68 00 6F  .\.l.o.c .a.l.h.o
[0B0] 00 73 00 74 00 00 00 16  00 00 00 00 00 00 00 16  .s.t.... ........
[0C0] 00 00 00 5C 00 5C 00 6C  00 6F 00 63 00 61 00 6C  ...\.\.l .o.c.a.l
[0D0] 00 68 00 6F 00 73 00 74  00 5C 00 62 00 75 00 73  .h.o.s.t .\.b.u.s
[0E0] 00 69 00 6E 00 65 00 73  00 73 00 34 00 00 00 0A  .i.n.e.s .s.4....
[0F0] 00 00 00 00 00 00 00 0A  00 00 00 62 00 75 00 73  ........ ...b.u.s
[100] 00 69 00 6E 00 65 00 73  00 73 00 34 00 00 00 13  .i.n.e.s .s.4....
[110] 00 00 00 00 00 00 00 13  00 00 00 53 00 61 00 6D  ........ ...S.a.m
[120] 00 62 00 61 00 20 00 50  00 72 00 69 00 6E 00 74  .b.a. .P .r.i.n.t
[130] 00 65 00 72 00 20 00 50  00 6F 00 72 00 74 00 00  .e.r. .P .o.r.t..
[140] 00 00 00 0A 00 00 00 00  00 00 00 0A 00 00 00 62  ........ .......b
[150] 00 75 00 73 00 69 00 6E  00 65 00 73 00 73 00 34  .u.s.i.n .e.s.s.4
[160] 00 00 00 12 00 00 00 00  00 00 00 12 00 00 00 48  ........ .......H
[170] 00 50 00 20 00 4C 00 61  00 73 00 65 00 72 00 4A  .P. .L.a .s.e.r.J
[180] 00 65 00 74 00 20 00 34  00 30 00 30 00 30 00 6E  .e.t. .4 .0.0.0.n
[190] 00 00 00 09 00 00 00 00  00 00 00 09 00 00 00 77  ........ .......w
[1A0] 00 69 00 6E 00 70 00 72  00 69 00 6E 00 74 00 00  .i.n.p.r .i.n.t..
[1B0] 00 00 00 04 00 00 00 00  00 00 00 04 00 00 00 52  ........ .......R
[1C0] 00 41 00 57 00 00 00 00  00 00 00 00 00 00 00 00  .A.W.... ........
[1D0] 00 00 00 00 00 00 00 00  00 00 00                 ........ ...
write_socket(3,546)
write_socket(3,546) wrote 546
got smb length of 84
[snip]
[000] 00 05 00 02 03 10 00 00  00 1C 00 00 00 09 00 00  ........ ........
[010] 00 04 00 00 00 00 00 00  00 05 00 00 00           ........ .....
[snip]
[000] 00 05 00 02 03 10 00 00  00 1C 00 00 00 09 00 00  ........ ........
[010] 00 04 00 00 00 00 00 00  00 05 00 00 00           ........ .....
rpc_check_hdr: rdata->data_size = 28
000000 smb_io_rpc_hdr rpc_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   : 00000009
000010 smb_io_rpc_hdr_resp rpc_hdr_resp
    0010 alloc_hint: 00000004
    0014 context_id: 0000
    0016 cancel_ct : 00
    0017 reserved  : 00
rpc_api_pipe: len left: 0 smbtrans read: 28
rpc_api_pipe: fragment first and last both set
000018 spoolss_io_r_setprinter 
    0018 status: WERR_ACCESS_DENIED
SetPrinter call failed!
make_spoolss_q_closeprinter
000000 spoolss_io_q_closeprinter 
    000000 smb_io_pol_hnd printer handle
        0000 data1: 00000000
        0004 data2: 00000002
        0008 data3: 0000
        000a data4: 0000
        000c data5: 46 b7 b5 3d 5b 0c 00 00 
rpc_api_pipe_req: Outgoing data not a multiple of 8 bytes....
create_rpc_request: opnum: 0x1d data_len: 0x2c
create_rpc_request: data_len: 2c auth_len: 0 alloc_hint: 1c
000000 smb_io_rpc_hdr hdr    
    0000 major     : 05
    0001 minor     : 00
    0002 pkt_type  : 00
    0003 flags     : 03
    0004 pack_type0: 10
    0005 pack_type1: 00
    0006 pack_type2: 00
    0007 pack_type3: 00
    0008 frag_len  : 002c
    000a auth_len  : 0000
    000c call_id   : 0000000a
000010 smb_io_rpc_hdr_req hdr_req
    0010 alloc_hint: 0000001c
    0014 context_id: 0000
    0016 opnum     : 001d
data_len: 2c data_calc_len: 2c
rpc_api_pipe: cmd:26 fnum:731e
[snip]
[000] 5C 50 49 50 45 5C 00 05  00 00 03 10 00 00 00 2C  \PIPE\.. .......,
[010] 00 00 00 0A 00 00 00 1C  00 00 00 00 00 1D 00 00  ........ ........
[020] 00 00 00 02 00 00 00 00  00 00 00 46 B7 B5 3D 5B  ........ ...F..=[
[030] 0C 00 00                                          ... 
write_socket(3,122)
write_socket(3,122) wrote 122
got smb length of 100
[snip]
[000] 00 05 00 02 03 10 00 00  00 30 00 00 00 0A 00 00  ........ .0......
[010] 00 18 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
[020] 00 00 00 00 00 00 00 00  00 00 00 00 00           ........ .....
[snip]
[000] 00 05 00 02 03 10 00 00  00 30 00 00 00 0A 00 00  ........ .0......
[010] 00 18 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
[020] 00 00 00 00 00 00 00 00  00 00 00 00 00           ........ .....
rpc_check_hdr: rdata->data_size = 44
000000 smb_io_rpc_hdr rpc_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  : 0030
    000a auth_len  : 0000
    000c call_id   : 0000000a
000010 smb_io_rpc_hdr_resp rpc_hdr_resp
    0010 alloc_hint: 00000018
    0014 context_id: 0000
    0016 cancel_ct : 00
    0017 reserved  : 00
rpc_api_pipe: len left: 4 smbtrans read: 44
rpc_read: data_to_read: 4 rdata offset: 44 extra_data_size: 4
rpc_read: grew buffer by 4 bytes to 48
write_socket(3,59)
write_socket(3,59) wrote 59
got smb length of 63
[snip]
[000] 00 00 00 00                                       .... 
rpc_read: num_read = 4, read offset: 0, to read: 4
rpc_api_pipe: fragment first and last both set
000018 spoolss_io_r_closeprinter 
    000018 smb_io_pol_hnd printer handle
        0018 data1: 00000000
        001c data2: 00000000
        0020 data3: 0000
        0022 data4: 0000
        0024 data5: 00 00 00 00 00 00 00 00 
    002c status: WERR_OK
write_socket(3,45)
write_socket(3,45) wrote 45
got smb length of 35
size=35
smb_com=0x4
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=1
smb_tid=1
smb_pid=3162
smb_uid=100
smb_mid=1
smt_wct=0
smb_bcc=0
result was NT_STATUS_UNSUCCESSFUL


-- 
-----------------------
Daniel T. Gynn
RHCE #806200978201621
Essential Systems, Inc.
412-931-5403 ext. 1
fax: 412-931-5425
dan.gynn at essensys.com
GnuPG Key http://www.essensys.com/~dan/gpgring.asc
Fingerprint: 1341 3132 FDAC C415 8F5F 03D7 FD4E 166B FA90 58E1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba/attachments/20021023/17ecdcda/attachment.bin


More information about the samba mailing list