LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-14-2004, 11:10 PM   #1
JohnLocke
Member
 
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 240

Rep: Reputation: 31
Samba 2.2.8 MDK 9.2 / Win XP Pro interface problem


I've been trying various tutorials and manuals for Samba for about a week now, and keep getting stuck at the same problem. When trying to access from my XP machine, I get the error:

Code:
\\Lenny is not accessible. You might not have permission to use this network
 resource. Contact the administrator of this server to find out if you have
 access permissions.

The network path was not found.
My first thought was, I'm running shorewall. I added this to my routestopped file and shut down shorewall:
Code:
#INTERFACE      HOST(S)
eth0
No change (btw, nothing is being logged in either /var/log/messages or in /etc/samba/smbd.log in relation to any of this)

Since that didn't work, I thought I'd be more explicit:
Code:
#INTERFACE      HOST(S)
eth0                 192.168.1.0/24
But no joy. I get the same errors regardless of whether the firewall is running or stopped. I do have ports 137:139 open to tcp traffic under shorewall, in fact, here's the /etc/shorewall/rules file:
Code:
#ACTION  SOURCE         DEST            PROTO   DEST    SOURCE     ORIGINAL
#                                               PORT    PORT(S)    DEST
ACCEPT  net     fw      tcp     80,445,22,137:139       -
ACCEPT  fw      net     tcp     80,53,137:139
ACCEPT  fw      net     udp     53
ACCEPT  fw      net     icmp    8
ACCEPT  net     fw      icmp    8
and the /etc/shorewall/policy file
Code:
#SOURCE         DEST            POLICY          LOG LEVEL       LIMIT:BURST
#loc    net     ACCEPT  info
fw      net     ACCEPT  info
net     fw      REJECT  info
all     all     REJECT  info
I thought maybe I hadn't created a user correctly, so I did the smbpasswd -u <user> again, and nothing changed in the hash under the user name for the win XP box. No luck there.

My /etc/samba/smb.conf file looks like this currently:
Code:
[global]
workgroup = BRADFORD
netbios name = Lenny
encrypt passwords = yes
security = share
debug timestamp = no
log level = 3
max log size = 20000
log file = /etc/samba/%m.log

[homes]
read only = no
browseable = no

[everyone]
path = /var/data
read only = no
browseable = yes
guest ok = yes

[apps]
path = /var/data
browseable = yes
valid users = @admins, root
write list = @admins, root
I do have a directory /var/data, and it's drwxrwxrwx right now (I gave up being picky ... I'm already behind a local firewall so I can afford to try this stuff). Same for the home account for the WinXP user.

Win XP can see the Win98 machine, both can see Lenny there on the network as Samba2.2.8(Lenny), but both get the same connection error (I expect this from Win98SE right now because I think [might be wrong] it didn't use encrypted passwords ... I haven't bothered trying to fully set up that machine yet)

SSH, ping, and my webserver are all working well ... so I don't have any extra clues to rule out problems and I'm feeling a little stuck. Any ideas of commands to run some extra tests or whatnot? Something stupid I've done that you see? Anything! Come on! Anything!!!
 
Old 07-15-2004, 12:18 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
try on Lenny himself

smbclient '//Lenny/homes' -U userid

where userid is a user
at the prompt try the password to make sure that is set up ok
you will get
smb: \>
if all is good
if not more cavorting with password is in order
q to quit

another thing i don't see in smb.conf is which machine is the WINS server ??
did you set xp to use Lenny as the WINS server ??
in [global] you need
wins support = true
for Lenny to do it
or
wins server = blah.blah.blah.blah

also think possibly netBios name in smb.conf should be BRADFORD
(even though we both know the netBios setting in Windows says Lenny ?? go figure)
if i remember it's best to only run
client for Microsoft Networks
and
TCP/IP
on the Windows Machine and not NetBEUI
and select "enable netBIOS over TCP/IP" on the WINS tab of advanced TCP/IP settings

there might be (are) lots of ways to set it up and i know very little about windows networks
so i will give you my global section
i have one Windows 2000 client to my samba with user name the same on each machine
my Windows workgroup is the default WORKGROUP and the WIn2000 name/netBiosname is BART

hope this helps (it's working for me anyway)
Code:
[global]
	username map = /etc/samba/user.map
	unix password sync = yes
	workgroup = WORKGROUP
	valid users = gary
	dns proxy = no
	wins support = true
	encrypt passwords = yes
	max log size = 50
	allow hosts = 192.168.0.2  192.168.0.1
	load printers = yes
	writeable = yes
	smb passwd file = /etc/samba/smbpasswd
	socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
	os level = 20
	netbios name = WORKGROUP
	null passwords = yes
	log file = /var/log/samba/%m.log
	security = user
;	remote announce = 192.168.0.255/WORKGROUP
	default = gary
	printcap name = /etc/printcap  
	passwd program = /usr/bin/passwd
Oh yea i seem to have to boot the Linux computer first
if i reboot the Linux computer the Windows computer complains about
duplicate names on the network and won't see the samba server till after it gets rebooted as well ??

Last edited by foo_bar_foo; 07-15-2004 at 12:21 AM.
 
Old 07-15-2004, 01:04 AM   #3
JohnLocke
Member
 
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 240

Original Poster
Rep: Reputation: 31
one step closer:

Trying the connection on Lenny himself works! This makes me think it's still either a firewall or windows problem ... probably not the firewall because all the webhosting and ssh server stuff is working like a peach. As to windows, I have it configured as you suggest. The only change I needed to make was to enable netbios over tcp/ip instead of using the default option.

Tried it after that. No luck.

Next I tried changing the smb.conf global part of the file as you suggest. I tried changes in increments that made sense to me, but nothing worked ... here's my new smb.conf:

Code:
[global]
workgroup = BRADFORD
netbios name = BRADFORD
encrypt passwords = yes
security = user
debug timestamp = no
log level = 3
max log size = 20000
log file = /etc/samba/%m.log
wins support = true
load printers = yes
writeable = yes
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
os level = 20
null passwords = yes
null passwords = yes
remote announce = 192.168.1.255/BRADFORD
default = mac
printcap name = /etc/printcap
passwd program = /usr/bin/passwd
allow hosts = 192.168.1.129
valid users = mac

[test]
path = /usr/local/samba/tmp
read only = no
guest ok = yes

[homes]
read only = no
browseable = no

[everyone]
path = /var/data
read only = no
browseable = yes
guest ok = yes

[apps]
path = /var/data
browseable = yes
valid users = @admins, root
write list = @admins, root
A new interesting problem(?) is that now nmbd is listed twice in my ps -ef list! It starts under root once, and then it spawns another copy of itself ... if that's not clear, here's a ps -ef | grep mdb:

Code:
root      6456     1  0 11:51 ?        00:00:00 smbd -D
root      5293     1  0 11:51 ?        00:00:00 nmbd -D
root      8802  5293  0 11:51 ?        00:00:00 nmbd -D
So when I do a > smb restart ... it doesn't actually work. I have to do > smb stop > smb stop > smb start

Something there doesn't seem quite right.

Oh, and of course, now the computer is listed in the windows network as Samba 2.2.8 (Bradford) instead of Lenny. I still see the Lenny computer, but haven't checked to see if that's because nmbd is running twice or if I haven't properly refreshed windows (aka, complete shutdown and cool down )
 
Old 07-15-2004, 02:18 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
sorry it didn't help
i don't know anything about shorewall so i'm also no help there
i think there is a clue in the two instances of nmbd
this would indicate the handeling of the request for the netbios name
OK (shock) i might be wrong about the netbios name (using the same as workgroup)
my samba server never identifies itself as the same as the workgroup
like yours did ... this leads me to believe mine is using DNS instead of netbios and
as a result i only have one instance of nmbd running
possibly this is allowing me to have netbios name wrong but it's not causing problems.

so i think try two things go back to the proper netbios name "LENNY"

and if that doesn't work try using the lmhost file thingy in Winblows
(don't know if you did that already)
it's a file on windows like /etc/hosts
format: (only use netbios name not whole domain)
172.16.1.1 HOSTNAME1
172.16.1.2 HOSTNAME2
172.16.1.3 HOSTNAME3
like that
there is a sample file i think on the Win98 computer in /Windows/lmhost.sam
on xp i think it goes in /WINNT/system32/drivers/etc but the import button does it automatically
on the WINS tab check enable LMHOST lookup
then save your file somewhere (called lmhost) and import it with
Import LMHOST
 
Old 07-20-2004, 04:13 PM   #5
JohnLocke
Member
 
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 240

Original Poster
Rep: Reputation: 31
The Samba Battle Continues on a new front:

I'm in! I don't know why, I'm just in. I restarted the network, then the smb service, then the whole damn machine, and all of a sudden it works!

Now I'm trying to figure out what the errors are that are cropping up in my /var/log/messages file:

Code:
Jul 20 01:31:15 lenny smbd[11911]: connect_to_client: Can't resolve address for BOB
Jul 20 01:31:15 lenny smbd[11911]: authorise_login: rejected invalid user nobody
Jul 20 01:31:15 lenny smbd[11911]: bob (192.168.1.129) couldn't find service ::{2227a280-3aea-1069-a2de-08002b30309d}
Jul 20 01:31:15 lenny smbd[11911]: authorise_login: rejected invalid user nobody
Jul 20 01:31:31 lenny last message repeated 8 times
Jul 20 01:31:31 lenny smbd[11911]: bob (192.168.1.129) couldn't find service ma
Jul 20 01:31:47 lenny smbd[11911]: authorise_login: rejected invalid user nobody
Jul 20 01:31:47 lenny smbd[11911]: authorise_login: rejected invalid user nobody

Jul 20 01:35:48 lenny nmbd[24124]: *****
Jul 20 01:35:48 lenny nmbd[24124]:
Jul 20 01:35:48 lenny nmbd[24124]: Samba name server LENNY is now a local master browser for workgroup BRADFORD on subnet 192.168.1.3
Jul 20 01:35:48 lenny nmbd[24124]:
Jul 20 01:35:48 lenny nmbd[24124]: *****

Jul 20 01:35:57 lenny smbd[11911]: authorise_login: rejected invalid user nobody
Jul 20 01:35:57 lenny smbd[11911]: authorise_login: rejected invalid user nobody

Jul 20 01:35:59 lenny nmbd[24124]: find_domain_master_name_query_fail:
Jul 20 01:35:59 lenny nmbd[24124]: Unable to find the Domain Master Browser name BRADFORD<1b> for the workgroup BRADFORD.
Jul 20 01:35:59 lenny nmbd[24124]: Unable to sync browse lists in this workgroup.
Just to see if I'm going crazy, this is what I see from these logs (these were generated when I connected to lenny from bob via the network neighborhood):

First it can't figure out who bob is ... then it rejects the user (although I'm in?). Then it knows who bob is, but can't find some service it's looking for (am I missing some protocol maybe?). It rejects the hell out of "user nobody" ... is this a group or something? I'm missing where it pulled that name from. The user name from bob sure isn't "nobody".

Then Samba became the local master broswer (woohoo!) ... then it can't find the domain master browser for my workgroup (bradford) ... erm?. So I'm confused.

Oh, and I'm still getting two nmdb services ... what's up with that? I'll paste in my smb.conf file as well:

Code:
[global]
workgroup = BRADFORD
netbios name = lenny
encrypt passwords = yes
security = user
debug timestamp = no
log level = 3
max log size = 20000
log file = /etc/samba/%m.log
wins support = true
load printers = yes
writeable = yes
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
os level = 20
null passwords = yes
printcap name = /etc/printcap
passwd program = /usr/bin/passwd
allow hosts = 192.168.1.129
valid users = mac

[test]
path = /usr/local/samba/tmp
read only = no
guest ok = yes

[homes]
read only = no
browseable = no

[everyone]
path = /var/data
read only = no
browseable = yes
guest ok = yes

[apps]
path = /var/data
browseable = yes
valid users = @admins, root
write list = @admins, root
Am finally most of the way there! Thanks for all the help!
 
Old 07-20-2004, 04:40 PM   #6
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
And I thought that Microsoft Bob had died a death!

He's not hiding in your lmhosts or hosts file on the XP machine @ C:\Windows\System32\drivers\etc is he?

If not who are your users on the linux box?
 
Old 07-20-2004, 08:29 PM   #7
JohnLocke
Member
 
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 240

Original Poster
Rep: Reputation: 31
Maybe I'm misunderstanding ...

In my lmhosts file on the windos machines, the only thing I've added is lenny, my linux computer at 192.168.1.3

Bob is my WinXP computer, but I thought it was the user on Bob (mac) who must have a linux account and samba account although, even though I've added that user to the linux box with a home account and all (I can log in with that name), and added it to samba, I only see this in the smbusers:

Code:
# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin
nobody = guest pcguest smbguest
This makes me wonder if I need to add a new group / unix name and list. Something like:
Code:
hooduser = mac
The smbpasswd file /does/ contain a hashed password for mac, however.

So I have Bob's user with an account on the linux box, a few other accounts, myself and root.

Does this answer your question?
 
Old 07-20-2004, 10:29 PM   #8
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
You should really upgrade Samba.

Samba has trouble working with Windows XP, and they have made many advancements and bug fixes since your version.
 
Old 07-20-2004, 11:22 PM   #9
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
good you got it going !
The smbuser file is fine

i think you have a conflict between
security = user
valid users = mac
and
guest ok = yes
(guest ok gets access without a passwd)

not sure

you could try the global directive

guest account = nobody

and take out
security = usr
and possibly
valid users = mac

security = usr
effects how clients negitiate a response big time
 
Old 07-21-2004, 07:41 PM   #10
JohnLocke
Member
 
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 240

Original Poster
Rep: Reputation: 31
Ok ... more there than not now.

I restructured my smb.conf with your suggestions + simplifying it even more (when in doubt, cut it out!). So I'm left with this atm:
Code:
[global]
workgroup = BRADFORD
netbios name = lenny
encrypt passwords = yes
debug timestamp = no
log level = 2
max log size = 20000
log file = /etc/samba/%m.log
wins support = true
load printers = yes
writeable = yes
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
os level = 20
null passwords = yes
printcap name = /etc/printcap
passwd program = /usr/bin/passwd
guest account = nobody

[everyone]
path = /var/data
read only = no
browseable = yes
This works. So far. I had to restart the computer again. I'm still having the problem that shorewall (I suspect) is changing some of my system variables periodically (the one I've noticed the most is in sysctl.conf, the ICMP_ECHO_IGNORE_ALL var. Keeps changing it to 1 at least within an hour or two of when I change it back and restart network services. I'm wondering if it's changing anything else that could be affecting Samba down the line.

In any case ... this works. This is also the bare-bones of what I need and I can build from it fairly easily.

Now, one of the strange things I've seen so far is logging. I've got logging turned on (obviously), and when I navigate from a windows PC through to my linux PC ... it logs about 8 instances of the following and does it nearly instantly:
Code:
Mac opened file test.txt read=Yes write=No (numopen=2)
mac closed file test.txt (numopen=1)
is this normal?

MS3FGX: If I were to upgrade Samba ... first of all, would you recommend staying with the 2.2 distribution or going to 3.0? Secondly, I'm not yet sure /how/ to upgrade samba .... not only how to do it, but what files to preserve and how to keep the settings I currently have.
 
Old 07-21-2004, 07:43 PM   #11
JohnLocke
Member
 
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 240

Original Poster
Rep: Reputation: 31
Here's another instance of something strange. ...
Everything is working well, and yet in my bob.log (bob's the windows computer):
Code:
Couldn't find user 'nobody' in passdb.
Couldn't find user 'nobody' in passdb.
pass_check_smb failed - invalid password for user [mac]
Couldn't find user 'nobody' in passdb.
erm ..... if I was just reading this log, I'd think that samba rejected the password for user mac and someone was trying to log in under a guest (no password) account ... but neither is the case! Mac is logged in just fine and no one else is touching the box!

Any idea what these mean?
 
Old 07-22-2004, 02:05 AM   #12
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
You should really upgrade to the latest version (3.0.4).

All you would have to do would be to upgrade using the package manager. The exact method of how to do this depends on what distro you are running.

You shouldn't have to do anything manually, after you upgrade the package, all the proper files will be placed in the correct location.
 
Old 07-24-2004, 01:12 PM   #13
JohnLocke
Member
 
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 240

Original Poster
Rep: Reputation: 31
I upgraded initially to 2.2.9 ... which was working to an extent.

The problems I was seeing after this were with my connection to XP timing out to the drive I mapped.

The exact error was:

Code:
An error occurred while reconnectiong Z: to \\Lenny\everyone

Microsoft Windows Networ : The network path was not found.

This connection has not been restored.
I could restart the computer and have no problems.

I'm now in process of upgrading to 3.0.4 to see if this fixes anything. I'll keep everyone posted in case someone else is having these problems.
 
Old 07-24-2004, 03:57 PM   #14
JohnLocke
Member
 
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 240

Original Poster
Rep: Reputation: 31
Everything looks the same ... which isn't right. I think.

I upgraded (I thought) initially to 2.2.9, but I think all I did was use the mandrake update and go to 2.2.7a's security update. In any case, this is what I see in Network Neighborhood under windows:

Samba 2.2.7a-security-rollup-fix

I can browse as normal. Everything there seems to be working.

But I downloaded samba 3.0.4 from the net, unzipped, untarred, ./configure, make, make install .... and nothing changes? I guess this is really a question of what am I doing wrong ... missing a step to upgrade this?

And yes, smbd -V /does/ return 2.2.7
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem logging to Samba 3.0.6 from win Xp Pro carlos.a.lopez Linux - Networking 0 12-06-2004 09:28 AM
File sharing with Win XP Pro and MDK 9.1 how to? Kramer Linux - Networking 1 07-03-2004 06:45 PM
Samba - MDK 9.2 - Win 2k digitalgravy Linux - Networking 5 02-02-2004 02:16 PM
Setting up Samba with SuSe 8.1 and Win 2K/Win XP Pro crstine Linux - Networking 1 12-11-2002 06:21 AM
Win xp pro on samba PDC???? gritts Linux - Networking 13 11-26-2002 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration