Patch for smbclient command du, tar cn, PASSWD_FILE and PASSWD_FD

Alexandre Oliva oliva at dcc.unicamp.br
Thu Sep 17 00:02:11 GMT 1998


Luke Kenneth Casson Leighton <lkcl at switchboard.net> writes:

>> I'm not sure this has been fixed in the current sources; my local
>> build based on yesterday's CVS tree won't connect to SMB servers I've
>> got access to, not even one running SAMBA 1.9.18p10 :-(

> alexandre, please can you send a message to samba-bugs, with a tcpdump or
> netmon trace attached?  thanks!

Sure.  I've investigated the problem: it will not occur on my x86
(RedHat Linux 5.1) builds, only on the sparc (Solaris 2.[56]) builds.
Furthermore, I'm only unable to connect to the server if it demands
encryption.  This seems to indicate some byte-ordering problem in the
encryption code.

root at emilia:~[139]# tcpdump -i eth1 -x host sec-server.dcc.unicamp.br
tcpdump: listening on eth1

First, I tried to connect from host saci (143.106.24.137), running
Solaris 2.6, to sec-server, running MSWNT4 (ugh! :-)

01:01:04.597451 143.106.24.137.33015 > sec-server.dcc.unicamp.br.netbios-ssn: S 3669535075:3669535075(0) win 8760 <mss 1460> (DF)
                         4500 002c 2d8d 4000 fe06 0795 8f6a 1889
                         8f6a 104c 80f7 008b dab8 a963 0000 0000
                         6002 2238 28a6 0000 0204 05b4 3600
01:01:04.597451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.137.33015: S 1865357290:1865357290(0) ack 3669535076 win 8760 <mss 1460> (DF)
                         4500 002c df15 4000 7c06 d80c 8f6a 104c
                         8f6a 1889 008b 80f7 6f2f 17ea dab8 a964
                         6012 2238 a17b 0000 0204 05b4
01:01:04.597451 143.106.24.137.33015 > sec-server.dcc.unicamp.br.netbios-ssn: . ack 1 win 8760 (DF)
                         4500 0028 2d8e 4000 fe06 0798 8f6a 1889
                         8f6a 104c 80f7 008b dab8 a964 6f2f 17eb
                         5010 2238 b938 0000 8f6a 1889 008b
01:01:04.857451 143.106.24.137.33015 > sec-server.dcc.unicamp.br.netbios-ssn: P 1:77(76) ack 1 win 8760 (DF)
                         4500 0074 2d8f 4000 fe06 074b 8f6a 1889
                         8f6a 104c 80f7 008b dab8 a964 6f2f 17eb
                         5018 2238 9015 0000 8100 0048 2046 4445
                         4645 4443 4e46
01:01:04.857451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.137.33015: P 1:5(4) ack 77 win 8684 (DF)
                         4500 002c ec15 4000 7c06 cb0c 8f6a 104c
                         8f6a 1889 008b 80f7 6f2f 17eb dab8 a9b0
                         5018 21ec 372c 0000 8200 0000
01:01:04.857451 143.106.24.137.33015 > sec-server.dcc.unicamp.br.netbios-ssn: . ack 5 win 8760 (DF)
                         4500 0028 2d90 4000 fe06 0796 8f6a 1889
                         8f6a 104c 80f7 008b dab8 a9b0 6f2f 17ef
                         5010 2238 b8e8 0000 0000 020d 712a
01:01:04.857451 143.106.24.137.33015 > sec-server.dcc.unicamp.br.netbios-ssn: P 77:245(168) ack 5 win 8760 (DF)
                         4500 00d0 2d91 4000 fe06 06ed 8f6a 1889
                         8f6a 104c 80f7 008b dab8 a9b0 6f2f 17ef
                         5018 2238 cf2f 0000 0000 00a4 ff53 4d42
                         7200 0000 0000
01:01:04.867451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.137.33015: P 5:114(109) ack 245 win 8516 (DF)
                         4500 0095 ed15 4000 7c06 c9a3 8f6a 104c
                         8f6a 1889 008b 80f7 6f2f 17ef dab8 aa58
                         5018 2144 ebb9 0000 0000 0069 ff53 4d42
                         7200 0000 0080
01:01:04.917451 143.106.24.137.33015 > sec-server.dcc.unicamp.br.netbios-ssn: . ack 114 win 8760 (DF)
                         4500 0028 2d92 4000 fe06 0794 8f6a 1889
                         8f6a 104c 80f7 008b dab8 aa58 6f2f 185c
                         5010 2238 b7d3 0000 0000 0000 6056
01:01:07.407451 143.106.24.137.33015 > sec-server.dcc.unicamp.br.netbios-ssn: P 245:386(141) ack 114 win 8760 (DF)
                         4500 00b5 2d93 4000 fe06 0706 8f6a 1889
                         8f6a 104c 80f7 008b dab8 aa58 6f2f 185c
                         5018 2238 f134 0000 0000 0089 ff53 4d42
                         7300 0000 0008
01:01:07.587451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.137.33015: . ack 386 win 8375 (DF)
                         4500 0028 8016 4000 7c06 3710 8f6a 104c
                         8f6a 1889 008b 80f7 6f2f 185c dab8 aae5
                         5010 20b7 b8c7 0000
01:01:13.097451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.137.33015: P 114:153(39) ack 386 win 8375 (DF)
                         4500 004f 8517 4000 7c06 31e8 8f6a 104c
                         8f6a 1889 008b 80f7 6f2f 185c dab8 aae5
                         5018 20b7 6539 0000 0000 0023 ff53 4d42
                         7301 0005 0088
01:01:13.107451 143.106.24.137.33015 > sec-server.dcc.unicamp.br.netbios-ssn: F 386:386(0) ack 153 win 8760 (DF)
                         4500 0028 2d94 4000 fe06 0792 8f6a 1889
                         8f6a 104c 80f7 008b dab8 aae5 6f2f 1883
                         5011 2238 b71e 0000 2e44 4343 2e55
01:01:13.117451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.137.33015: F 153:153(0) ack 387 win 8375 (DF)
                         4500 0028 8617 4000 7c06 310f 8f6a 104c
                         8f6a 1889 008b 80f7 6f2f 1883 dab8 aae6
                         5011 20b7 b89e 0000
01:01:13.117451 143.106.24.137.33015 > sec-server.dcc.unicamp.br.netbios-ssn: . ack 154 win 8760 (DF)
                         4500 0028 2d95 4000 fe06 0791 8f6a 1889
                         8f6a 104c 80f7 008b dab8 aae6 6f2f 1884
                         5010 2238 b71d 0000 8f6a 1889 008b

smbclient said:

Session setup failed for username=backup myname=SACI destname=SEC-SERVER.DCC.UNICAMP.BR   ERRDOS - ERRnoaccess (Access denied.)
You might find the -U, -W or -n options useful
Sometimes you have to use `-n USERNAME' (particularly with OS/2)
Some servers also insist on uppercase-only passwords

Then I tried from barnabe (143.106.24.132), running RedHat Linux 5.1,
and succeeded:

01:01:28.647451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: S 188339082:188339082(0) win 512 <mss 1460>
                         4500 002c 4d00 0000 3f06 e727 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d38a 0000 0000
                         6002 0200 66db 0000 0204 05b4 2d53
01:01:28.657451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.132.2136: S 1865381355:1865381355(0) ack 188339083 win 8760 <mss 1460> (DF)
                         4500 002c 581b 4000 7c06 5f0c 8f6a 104c
                         8f6a 1884 008b 0858 6f2f 75eb 0b39 d38b
                         6012 2238 6177 0000 0204 05b4
01:01:28.657451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: . ack 1 win 32120 (DF)
                         4500 0028 4d01 4000 3f06 a72a 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d38b 6f2f 75ec
                         5010 7d78 1df4 0000 0204 05b4 2d53
01:01:28.907451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: P 1:77(76) ack 1 win 32120 (DF)
                         4500 0074 4d02 4000 3f06 a6dd 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d38b 6f2f 75ec
                         5018 7d78 e9ca 0000 8100 0048 2046 4445
                         4645 4443 4e46
01:01:28.917451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.132.2136: P 1:5(4) ack 77 win 8684 (DF)
                         4500 002c 7a1b 4000 7c06 3d0c 8f6a 104c
                         8f6a 1884 008b 0858 6f2f 75ec 0b39 d3d7
                         5018 21ec f727 0000 8200 0000
01:01:28.917451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: P 77:245(168) ack 5 win 32120 (DF)
                         4500 00d0 4d03 4000 3f06 a680 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d3d7 6f2f 75f0
                         5018 7d78 7162 0000 0000 00a4 ff53 4d42
                         7200 0000 0000
01:01:28.917451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.132.2136: P 5:114(109) ack 245 win 8516 (DF)
                         4500 0095 7b1b 4000 7c06 3ba3 8f6a 104c
                         8f6a 1884 008b 0858 6f2f 75f0 0b39 d47f
                         5018 2144 297b 0000 0000 0069 ff53 4d42
                         7200 0000 0080
01:01:28.937451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: . ack 114 win 32120 (DF)
                         4500 0028 4d06 4000 3f06 a725 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d47f 6f2f 765d
                         5010 7d78 1c8f 0000 0000 0059 e897
01:01:31.177451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: P 245:386(141) ack 114 win 32120 (DF)
                         4500 00b5 4d3c 4000 3f06 a662 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d47f 6f2f 765d
                         5018 7d78 0854 0000 0000 0089 ff53 4d42
                         7300 0000 0008
01:01:31.327451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.132.2136: . ack 386 win 8375 (DF)
                         4500 0028 9c1c 4000 7c06 1b0f 8f6a 104c
                         8f6a 1884 008b 0858 6f2f 765d 0b39 d50c
                         5010 20b7 78c3 0000
01:01:31.377451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.132.2136: P 114:207(93) ack 386 win 8375 (DF)
                         4500 0085 9d1c 4000 7c06 19b2 8f6a 104c
                         8f6a 1884 008b 0858 6f2f 765d 0b39 d50c
                         5018 20b7 c02b 0000 0000 0059 ff53 4d42
                         7300 0000 0088
01:01:31.397451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: . ack 207 win 32120 (DF)
                         4500 0028 4d45 4000 3f06 a6e6 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d50c 6f2f 76ba
                         5010 7d78 1ba5 0000 0000 00d9 70f3
01:01:31.407451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: P 386:468(82) ack 207 win 32120 (DF)
                         4500 007a 4d47 4000 3f06 a692 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d50c 6f2f 76ba
                         5018 7d78 3494 0000 0000 004e ff53 4d42
                         7500 0000 0008
01:01:31.527451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.132.2136: . ack 468 win 8293 (DF)
                         4500 0028 b31c 4000 7c06 040f 8f6a 104c
                         8f6a 1884 008b 0858 6f2f 76ba 0b39 d55e
                         5010 2065 7866 0000
01:01:31.917451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.132.2136: P 207:260(53) ack 468 win 8293 (DF)
                         4500 005d f11c 4000 7c06 c5d9 8f6a 104c
                         8f6a 1884 008b 0858 6f2f 76ba 0b39 d55e
                         5018 2065 1b19 0000 0000 0031 ff53 4d42
                         7500 0000 0088
01:01:31.937451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: . ack 260 win 32120 (DF)
                         4500 0028 4d51 4000 3f06 a6da 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d55e 6f2f 76ef
                         5010 7d78 1b1e 0000 0000 004d 3e4b
01:01:33.117451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: P 468:507(39) ack 260 win 32120 (DF)
                         4500 004f 4d68 4000 3f06 a69c 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d55e 6f2f 76ef
                         5018 7d78 958e 0000 0000 0023 ff53 4d42
                         7100 0000 0008
01:01:33.137451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.132.2136: P 260:299(39) ack 507 win 8254 (DF)
                         4500 004f 5e1d 4000 7c06 58e7 8f6a 104c
                         8f6a 1884 008b 0858 6f2f 76ef 0b39 d585
                         5018 203e f221 0000 0000 0023 ff53 4d42
                         7100 0000 0088
01:01:33.137451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: F 507:507(0) ack 299 win 32120
                         4500 0028 4d6a 0000 3f06 e6c1 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d585 6f2f 7716
                         5011 7d78 1acf 0000 0000 0023 ff53
01:01:33.167451 sec-server.dcc.unicamp.br.netbios-ssn > 143.106.24.132.2136: F 299:299(0) ack 508 win 8254 (DF)
                         4500 0028 621d 4000 7c06 550e 8f6a 104c
                         8f6a 1884 008b 0858 6f2f 7716 0b39 d586
                         5011 203e 7808 0000
01:01:33.167451 143.106.24.132.2136 > sec-server.dcc.unicamp.br.netbios-ssn: . ack 300 win 32120 (DF)
                         4500 0028 4d6e 4000 3f06 a6bd 8f6a 1884
                         8f6a 104c 0858 008b 0b39 d586 6f2f 7717
                         5010 7d78 1ace 0000 0000 0055 abe7


Both builds were based on the current CVS tree.  The compiler is egcs
1.1, if that matters.

Good luck! :-)

-- 
Alexandre Oliva
mailto:oliva at dcc.unicamp.br mailto:aoliva at acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



More information about the samba-technical mailing list