[Samba] \\<IP ADDRESS>\ works,
but \\<machine name>\ gives permission error.
Ray Collett
3dlover at gmail.com
Tue Sep 28 00:23:05 GMT 2004
Greetings Samba gurus,
Short:
I have some clients that can log into my samba server using the
samba servers IP number, but it fails when using the name of the
machine. I've tried solving this error for 2 days now, and I'm at a
dead end. I'd love some help with this.
Long:
I have a Fedora Core2 machine with 2 NIC's. One is hooked up to a
192.168.0.X network with an ADS Win2002 server and 10+ WinXP Corp
machines. The other is connected to a 192.168.221.X network with 20+
Win2002 workstations with no domain controller.
What I'm trying to achieve right now, is a samba server with no
login/authorization needed for any client. A total guest/anonymous
server. I want this thing wide open. Security is not an issue.
I have the following smb.conf
== smb.conf ============================================
[global]
dns proxy = yes
security = share
workgroup = NEWLANDS.CC
realm = NEWLANDS.CC
netbios name = BROWN
log file = /var/log/samba/%m.log
log level = 10
os level = 65
auto services = incoming
guest ok = Yes
force user = backburner
force group = NC3DUsers
[incoming]
writeable = yes
delete readonly = yes
path = /usr/local/share/incoming
case sensitive = yes
browseable = yes
read only = No
guest ok = Yes
force user = backburner
force group = NC3DUsers
===================================================
I have the incoming folder chown'ed as backburner:NC3DUsers. When I
try to open the samba server \\BROWN\ from one of the 192.168.221.X
boxes, it works great. But when I try to access it from one of the
192.168.0.X machines \\BROWN\ fails, but using it's IP address
\\192.168.0.141\ works!
The failure message I get is:
== Failure message ====================================
"\\brown is not accessible. You might not have the permission to use
this network resource. Contact the administrator of this server to
find out if you have access permissions. The account is not
authorized to log in from this station."
===================================================
I don't understand why it says I don't have the permission, when it
works using the IP of the samba box. At the command prompt, you can
see the difference:
== Command Prompt ==================================
C:\>net view \\brown
System error 5 has occurred.
Access is denied.
C:\>net view \\192.168.0.141
Shared resources at \\192.168.0.141
Samba 3.0.3-5
Share name Type Used as Comment
-------------------------------------------------------------------------------
incoming Disk
The command completed successfully.
C:\>
===================================================
So, I looked at the logs that samba spits out. Here's a log (level
10) of what happens when I try to browse from a 192.168.0.X computer
using \\BROWN (and thus failing)
== 192.168.0.110.log ===================================
[2004/09/27 13:41:38, 3] smbd/oplock.c:init_oplocks(1226)
open_oplock_ipc: opening loopback UDP socket.
[2004/09/27 13:41:38, 10] lib/util_sock.c:open_socket_in(698)
bind succeeded on port 0
[2004/09/27 13:41:38, 3] smbd/oplock_linux.c:linux_init_kernel_oplocks(303)
Linux kernel oplocks enabled
[2004/09/27 13:41:38, 3] smbd/oplock.c:init_oplocks(1257)
open_oplock ipc: pid = 23147, global_oplock_port = 32952
[2004/09/27 13:41:38, 4] lib/time.c:get_serverzone(122)
Serverzone is 25200
[2004/09/27 13:41:38, 10] lib/util_sock.c:read_smb_length_return_keepalive(486)
got smb length of 133
[2004/09/27 13:41:38, 6] smbd/process.c:process_smb(889)
got message type 0x0 of len 0x85
[2004/09/27 13:41:38, 3] smbd/process.c:process_smb(890)
Transaction 0 of length 137
[2004/09/27 13:41:38, 5] lib/util.c:show_msg(478)
[2004/09/27 13:41:38, 5] lib/util.c:show_msg(488)
size=133
smb_com=0x72
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=24
smb_flg2=51283
smb_tid=0
smb_pid=65279
smb_uid=0
smb_mid=0
smt_wct=0
smb_bcc=98
[2004/09/27 13:41:38, 10] lib/util.c:dump_data(1886)
[000] 02 50 43 20 4E 45 54 57 4F 52 4B 20 50 52 4F 47 .PC NETW ORK PROG
[010] 52 41 4D 20 31 2E 30 00 02 4C 41 4E 4D 41 4E 31 RAM 1.0. .LANMAN1
[020] 2E 30 00 02 57 69 6E 64 6F 77 73 20 66 6F 72 20 .0..Wind ows for
[030] 57 6F 72 6B 67 72 6F 75 70 73 20 33 2E 31 61 00 Workgrou ps 3.1a.
[040] 02 4C 4D 31 2E 32 58 30 30 32 00 02 4C 41 4E 4D .LM1.2X0 02..LANM
[050] 41 4E 32 2E 31 00 02 4E 54 20 4C 4D 20 30 2E 31 AN2.1..N T LM 0.1
[060] 32 00 2.
[2004/09/27 13:41:38, 3] smbd/process.c:switch_message(685)
switch message SMBnegprot (pid 23147)
[2004/09/27 13:41:38, 3] smbd/sec_ctx.c:set_sec_ctx(288)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2004/09/27 13:41:38, 5] auth/auth_util.c:debug_nt_user_token(486)
NT user token: (NULL)
[2004/09/27 13:41:38, 5] auth/auth_util.c:debug_unix_user_token(505)
UNIX token of user 0
Primary group is 0 and contains 0 supplementary groups
[2004/09/27 13:41:38, 5] smbd/uid.c:change_to_root_user(282)
change_to_root_user: now uid=(0,0) gid=(0,0)
[2004/09/27 13:41:38, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [PC NETWORK PROGRAM 1.0]
[2004/09/27 13:41:38, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [LANMAN1.0]
[2004/09/27 13:41:38, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [Windows for Workgroups 3.1a]
[2004/09/27 13:41:38, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [LM1.2X002]
[2004/09/27 13:41:38, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [LANMAN2.1]
[2004/09/27 13:41:38, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [NT LM 0.12]
[2004/09/27 13:41:38, 10] lib/util.c:set_remote_arch(1861)
set_remote_arch: Client arch is 'Win2K'
[2004/09/27 13:41:38, 6] param/loadparm.c:lp_file_list_changed(2668)
lp_file_list_changed()
file /etc/samba/smb.conf -> /etc/samba/smb.conf last mod_time: Mon
Sep 27 13:13:42 2004
[2004/09/27 13:41:38, 6] param/loadparm.c:lp_file_list_changed(2668)
lp_file_list_changed()
file /etc/samba/smb.conf -> /etc/samba/smb.conf last mod_time: Mon
Sep 27 13:13:42 2004
[2004/09/27 13:41:38, 10] smbd/negprot.c:get_challenge(40)
get challenge: creating negprot_global_auth_context
[2004/09/27 13:41:38, 5] auth/auth.c:make_auth_context_subsystem(490)
Making default auth method list for security=share, encrypt passwords = yes
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(45)
Attempting to register auth backend rhosts
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(57)
Successfully added auth method 'rhosts'
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(45)
Attempting to register auth backend hostsequiv
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(57)
Successfully added auth method 'hostsequiv'
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(45)
Attempting to register auth backend sam
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(57)
Successfully added auth method 'sam'
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(45)
Attempting to register auth backend sam_ignoredomain
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(57)
Successfully added auth method 'sam_ignoredomain'
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(45)
Attempting to register auth backend unix
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(57)
Successfully added auth method 'unix'
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(45)
Attempting to register auth backend winbind
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(57)
Successfully added auth method 'winbind'
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(45)
Attempting to register auth backend smbserver
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(57)
Successfully added auth method 'smbserver'
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(45)
Attempting to register auth backend trustdomain
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(57)
Successfully added auth method 'trustdomain'
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(45)
Attempting to register auth backend ntdomain
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(57)
Successfully added auth method 'ntdomain'
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(45)
Attempting to register auth backend guest
[2004/09/27 13:41:38, 5] auth/auth.c:smb_register_auth(57)
Successfully added auth method 'guest'
[2004/09/27 13:41:38, 5] auth/auth.c:load_auth_module(384)
load_auth_module: Attempting to find an auth method to match guest
[2004/09/27 13:41:38, 5] auth/auth.c:load_auth_module(409)
load_auth_module: auth method guest has a valid init
[2004/09/27 13:41:38, 5] auth/auth.c:load_auth_module(384)
load_auth_module: Attempting to find an auth method to match sam
[2004/09/27 13:41:38, 5] auth/auth.c:load_auth_module(409)
load_auth_module: auth method sam has a valid init
[2004/09/27 13:41:38, 10] smbd/negprot.c:get_challenge(45)
get challenge: getting challenge
[2004/09/27 13:41:38, 5] auth/auth.c:get_ntlm_challenge(95)
auth_get_challenge: module guest did not want to specify a challenge
[2004/09/27 13:41:38, 5] auth/auth.c:get_ntlm_challenge(95)
auth_get_challenge: module sam did not want to specify a challenge
[2004/09/27 13:41:38, 5] auth/auth.c:get_ntlm_challenge(135)
auth_context challenge created by random
[2004/09/27 13:41:38, 5] auth/auth.c:get_ntlm_challenge(136)
challenge is:
[2004/09/27 13:41:38, 5] lib/util.c:dump_data(1886)
[000] 5C 0C 9B 00 40 F2 EE 77 \... at ..w
[2004/09/27 13:41:38, 3] smbd/negprot.c:reply_nt1(323)
not using SPNEGO
[2004/09/27 13:41:38, 3] smbd/negprot.c:reply_negprot(532)
Selected protocol NT LM 0.12
[2004/09/27 13:41:38, 5] smbd/negprot.c:reply_negprot(538)
negprot index=5
[2004/09/27 13:41:38, 5] lib/util.c:show_msg(478)
[2004/09/27 13:41:38, 5] lib/util.c:show_msg(488)
size=101
smb_com=0x72
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=51201
smb_tid=0
smb_pid=65279
smb_uid=0
smb_mid=0
smt_wct=17
smb_vwv[ 0]= 5 (0x5)
smb_vwv[ 1]=12802 (0x3202)
smb_vwv[ 2]= 256 (0x100)
smb_vwv[ 3]= 1024 (0x400)
smb_vwv[ 4]= 65 (0x41)
smb_vwv[ 5]= 0 (0x0)
smb_vwv[ 6]= 256 (0x100)
smb_vwv[ 7]=27392 (0x6B00)
smb_vwv[ 8]= 90 (0x5A)
smb_vwv[ 9]=64768 (0xFD00)
smb_vwv[10]=32995 (0x80E3)
smb_vwv[11]= 0 (0x0)
smb_vwv[12]=48941 (0xBF2D)
smb_vwv[13]=53858 (0xD262)
smb_vwv[14]=50340 (0xC4A4)
smb_vwv[15]=41985 (0xA401)
smb_vwv[16]= 2049 (0x801)
smb_bcc=32
[2004/09/27 13:41:38, 10] lib/util.c:dump_data(1886)
[000] 5C 0C 9B 00 40 F2 EE 77 4E 00 45 00 57 00 4C 00 \... at ..w N.E.W.L.
[010] 41 00 4E 00 44 00 53 00 2E 00 43 00 43 00 00 00 A.N.D.S. ..C.C...
[2004/09/27 13:41:38, 6] lib/util_sock.c:write_socket(430)
write_socket(22,105)
[2004/09/27 13:41:38, 6] lib/util_sock.c:write_socket(433)
write_socket(22,105) wrote 105
[2004/09/27 13:41:38, 10] lib/util_sock.c:read_socket_data(359)
read_socket_data: recv of 4 returned 0. Error = Success
[2004/09/27 13:41:38, 10] lib/util_sock.c:receive_smb_raw(537)
receive_smb_raw: length < 0!
[2004/09/27 13:41:38, 3] smbd/process.c:timeout_processing(1104)
timeout_processing: End of file from client (client has disconnected).
[2004/09/27 13:41:38, 5] lib/gencache.c:gencache_shutdown(88)
Closing cache file
[2004/09/27 13:41:38, 5] libsmb/namecache.c:namecache_shutdown(79)
namecache_shutdown: netbios namecache closed successfully.
[2004/09/27 13:41:38, 3] smbd/sec_ctx.c:set_sec_ctx(288)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2004/09/27 13:41:38, 5] auth/auth_util.c:debug_nt_user_token(486)
NT user token: (NULL)
[2004/09/27 13:41:38, 5] auth/auth_util.c:debug_unix_user_token(505)
UNIX token of user 0
Primary group is 0 and contains 0 supplementary groups
[2004/09/27 13:41:38, 5] smbd/uid.c:change_to_root_user(282)
change_to_root_user: now uid=(0,0) gid=(0,0)
[2004/09/27 13:41:38, 2] smbd/server.c:exit_server(568)
Closing connections
[2004/09/27 13:41:38, 3] smbd/connection.c:yield_connection(69)
Yielding connection to
[2004/09/27 13:41:38, 3] smbd/connection.c:yield_connection(76)
yield_connection: tdb_delete for name failed with error Record does
not exist.
[2004/09/27 13:41:38, 5] smbd/oplock.c:receive_local_message(107)
receive_local_message: doing select with timeout of 1 ms
[2004/09/27 13:41:38, 3] smbd/server.c:exit_server(611)
Server exit (normal exit)
[2004/09/27 13:41:38, 6] param/loadparm.c:lp_file_list_changed(2668)
lp_file_list_changed()
file /etc/samba/smb.conf -> /etc/samba/smb.conf last mod_time: Mon
Sep 27 13:13:42 2004
===================================================
It repeats theis snippet 3-4 times, failing everytime. And here is a
snippet of a successful connection from the same machine using
\\192.168.0.141\
== 192.168.0.110.log ===================================
[2004/09/27 16:54:59, 3] smbd/oplock.c:init_oplocks(1226)
open_oplock_ipc: opening loopback UDP socket.
[2004/09/27 16:54:59, 10] lib/util_sock.c:open_socket_in(698)
bind succeeded on port 0
[2004/09/27 16:54:59, 3] smbd/oplock_linux.c:linux_init_kernel_oplocks(303)
Linux kernel oplocks enabled
[2004/09/27 16:54:59, 3] smbd/oplock.c:init_oplocks(1257)
open_oplock ipc: pid = 24268, global_oplock_port = 33075
[2004/09/27 16:54:59, 4] lib/time.c:get_serverzone(122)
Serverzone is 25200
[2004/09/27 16:54:59, 10] lib/util_sock.c:read_smb_length_return_keepalive(486)
got smb length of 133
[2004/09/27 16:54:59, 6] smbd/process.c:process_smb(889)
got message type 0x0 of len 0x85
[2004/09/27 16:54:59, 3] smbd/process.c:process_smb(890)
Transaction 0 of length 137
[2004/09/27 16:54:59, 5] lib/util.c:show_msg(478)
[2004/09/27 16:54:59, 5] lib/util.c:show_msg(488)
size=133
smb_com=0x72
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=24
smb_flg2=51283
smb_tid=0
smb_pid=65279
smb_uid=0
smb_mid=0
smt_wct=0
smb_bcc=98
[2004/09/27 16:54:59, 10] lib/util.c:dump_data(1886)
[000] 02 50 43 20 4E 45 54 57 4F 52 4B 20 50 52 4F 47 .PC NETW ORK PROG
[010] 52 41 4D 20 31 2E 30 00 02 4C 41 4E 4D 41 4E 31 RAM 1.0. .LANMAN1
[020] 2E 30 00 02 57 69 6E 64 6F 77 73 20 66 6F 72 20 .0..Wind ows for
[030] 57 6F 72 6B 67 72 6F 75 70 73 20 33 2E 31 61 00 Workgrou ps 3.1a.
[040] 02 4C 4D 31 2E 32 58 30 30 32 00 02 4C 41 4E 4D .LM1.2X0 02..LANM
[050] 41 4E 32 2E 31 00 02 4E 54 20 4C 4D 20 30 2E 31 AN2.1..N T LM 0.1
[060] 32 00 2.
[2004/09/27 16:54:59, 3] smbd/process.c:switch_message(685)
switch message SMBnegprot (pid 24268)
[2004/09/27 16:54:59, 3] smbd/sec_ctx.c:set_sec_ctx(288)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2004/09/27 16:54:59, 5] auth/auth_util.c:debug_nt_user_token(486)
NT user token: (NULL)
[2004/09/27 16:54:59, 5] auth/auth_util.c:debug_unix_user_token(505)
UNIX token of user 0
Primary group is 0 and contains 0 supplementary groups
[2004/09/27 16:54:59, 5] smbd/uid.c:change_to_root_user(282)
change_to_root_user: now uid=(0,0) gid=(0,0)
[2004/09/27 16:54:59, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [PC NETWORK PROGRAM 1.0]
[2004/09/27 16:54:59, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [LANMAN1.0]
[2004/09/27 16:54:59, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [Windows for Workgroups 3.1a]
[2004/09/27 16:54:59, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [LM1.2X002]
[2004/09/27 16:54:59, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [LANMAN2.1]
[2004/09/27 16:54:59, 3] smbd/negprot.c:reply_negprot(455)
Requested protocol [NT LM 0.12]
[2004/09/27 16:54:59, 10] lib/util.c:set_remote_arch(1861)
set_remote_arch: Client arch is 'Win2K'
[2004/09/27 16:54:59, 6] param/loadparm.c:lp_file_list_changed(2668)
lp_file_list_changed()
file /etc/samba/smb.conf -> /etc/samba/smb.conf last mod_time: Mon
Sep 27 13:48:28 2004
===================================================
I see that after the second dump_data, the failed connection (using
\\brown\) has these lines:
[2004/09/27 13:41:38, 10] lib/util_sock.c:receive_smb_raw(537)
receive_smb_raw: length < 0!
[2004/09/27 13:41:38, 3] smbd/process.c:timeout_processing(1104)
timeout_processing: End of file from client (client has disconnected).
On the successful connection (using \\192.168.0.141), it reports "got
smb length of 276" and it processes more information and the
connection is established. This is where I'm not smart enough to
proceed. I'm not really interested in why the Windows machine sends a
< 0 packet, but I am interested in what I can do to fix it. Is it
something I need to change on the Samba server? Is it a registery
hack on the WinXP boxes? If you need more information about my setup
or the logs that are being generated, I can send you more.
Thanks in advance!!!!!
-Ray Collett
More information about the samba
mailing list