LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 06-10-2005, 07:33 PM   #1
buddhahat
Member
 
Registered: Sep 2003
Distribution: Slackware 10, FreeBSD 6.2, Ubuntu 7.04
Posts: 60

Rep: Reputation: 15
Cannot connect to Samba server from Win2k client


Hello everyone.

I've combed through the Samba help and the forums before I posted this question and I couldn't find a post that will fix fix my issue.

My problem is that when I run C:\> net view \\SERVERNAME from a client I get System error 5 has occurred. Access is denied.

I have 3 machines, a Linux "server" and 2 Windows 2K Server "clients". There is no Domain only a workgroup named "WORKGROUP".

The Linux "server" is Slackware 10.0, kernel 2.4.26. I have installed Samba 3.0.14a. From the Linux box I can run the smbclient command and connect to itself without a problem.

When I run nmblookup -d 2 '*' on the Linux box I only get a positive query response from the server itself. Nothing from the 2 clients.

Using nmblookup -U CLIENTIPADDRESS 'CLIENTNAME' I can get a response from the client.

From the Linux server I can ping the the clients by IP address but not by CLIENTNAME.

I've started smdb, nmdb and winbindd as daemons from the command line. Here is the output from nmap:

PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
37/tcp open time
113/tcp open auth
139/tcp open netbios-ssn
445/tcp open microsoft-ds
587/tcp open submission


I don't have Active Directory, DNS or WINS server. Nor do I have a firewall. All IP's are dynamic from my Linksys router. I've added the Linux server to the hosts and lmhosts files on the clients.

From the Windows clients I can ping the Linux server by name or IP. I can also see the server if I browse the network.

Here is my smb.conf:

[global]
workgroup = WORKGROUP
share modes = yes

[homes]
comment = Home Directories
browsable = no
read only = no
create mode = 0750

[share1]
path = /tmp
comment = Some random files
read only = no
public = yes

Here is the output from testparm:

Load smb config files from /usr/local/samba/lib/smb.conf
Processing section "[homes]"
Processing section "[share1]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

# Global parameters
[global]

[homes]
comment = Home Directories
read only = No
create mask = 0750
browseable = No

[share1]
comment = Some random files
path = /tmp
read only = No
guest ok = Yes


Any help at this point will be greatly appreciated. Thanks.
 
Old 06-10-2005, 08:54 PM   #2
Mr54mk
Member
 
Registered: Dec 2003
Location: Cali
Distribution: Debian
Posts: 42

Rep: Reputation: 15
network

Can you tell me a little bit about what your doing on your network? Are you running a firewall on the Linux side. Where is the internet coming in from, Linksys. or the Linux server? Break it down...
 
Old 06-10-2005, 09:16 PM   #3
buddhahat
Member
 
Registered: Sep 2003
Distribution: Slackware 10, FreeBSD 6.2, Ubuntu 7.04
Posts: 60

Original Poster
Rep: Reputation: 15
Re: network

Quote:
Originally posted by Mr54mk
Can you tell me a little bit about what your doing on your network? Are you running a firewall on the Linux side. Where is the internet coming in from, Linksys. or the Linux server? Break it down...
There is no firewall.

The Internet is coming from the router/cable modem. But I don't see how this is relavent? I'm using a private IP scheme, 192.168.1.xxx

Thanks for the help!
 
Old 06-11-2005, 04:48 AM   #4
Keithj
Member
 
Registered: May 2005
Location: Essex and Norfolk
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155

Rep: Reputation: 30
i think you have the same problem I did. Samba won't let Windows machines access it. I went through all kinds of "try this" for months, till a Knoppix expert pointed out that smb.conf is usually in a root-owned directory with root-only access. He suggested moving it out to the user directory ("home"), making it "user-owned" and switching Samba to use that version.

It worked for me, and I now have the "switch" batch code in bootmisc.sh (a Knoppix boot-up commands file) so that it does it all automatically.
The relevant code, for my Knoppix installation, was:
smbd -D -s /home/smb.conf
nmbd -D -s /home/smb.conf

I typed that into the console, with "su" privileges, and that fixed it.

I also had to set up user-IDs on the Linux machine for the other computers - that may be because I had something configured wrongly in smb.conf, but it worked. That was
sudo adduser --force-badname Computer1
and give it a password
smbpasswd -a Computer1
and password again.

Repeat for Computer2, etc.

Hope that helps. It worked for me.
 
Old 06-11-2005, 06:58 AM   #5
buddhahat
Member
 
Registered: Sep 2003
Distribution: Slackware 10, FreeBSD 6.2, Ubuntu 7.04
Posts: 60

Original Poster
Rep: Reputation: 15
I'll give that a try...

Thanks Keithj!
 
Old 06-11-2005, 01:52 PM   #6
buddhahat
Member
 
Registered: Sep 2003
Distribution: Slackware 10, FreeBSD 6.2, Ubuntu 7.04
Posts: 60

Original Poster
Rep: Reputation: 15
Still stuck

Unfortunately that did not work. I still get the same error. Would you mind posting your smb.conf? Maybe mine is missing something.

Thanks.
 
Old 06-11-2005, 02:38 PM   #7
Keithj
Member
 
Registered: May 2005
Location: Essex and Norfolk
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155

Rep: Reputation: 30
it's worth checking that your lisa config is correct - the right IP address, that sort of thing. In Knoppix it's easy to get to via K - Control Center - Internet & Network - Local Network Browsing, where you can check the setup of your Windows shares and the LISa Daemon. I found it a bit less so in Suse, and virtually impossible in Mandrake. I've not tried Slackware, so can't say about that.


Here is my smb.conf - it doesn't live in /etc/samba/ because that is root-only so the sharing machines can't use it. I suppose I should edit the first line one day...

; /etc/samba/smb.conf
;
; Sample configuration file for the Samba suite for Debian GNU/Linux
;
; Please see the manual page for smb.conf for detailed description of
; every parameter.
;

[global]

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
printing = cups
printcap name = cups
load printers = yes
guest account = nobody
invalid users = root

; "security = user" is always a good idea. This will require a Unix account
; in this server for every user accessing the server.
security = user

; Change this for the workgroup your Samba server will part of
workgroup = WORKGROUP

server string = VINCENTE

; If you want Samba to log though syslog only then set the following
; parameter to 'yes'. Please note that logging through syslog in
; Samba is still experimental.
syslog only = no

; We want Samba to log a minimum amount of information to syslog. Everything
; should go to /var/log/{smb,nmb} instead. If you want to log through
; syslog you should set the following parameter to something higher.
syslog = 0;

; This socket options really speed up Samba under Linux, according to my
; own tests.
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096

; Passwords are encrypted by default. This way the latest Windows 95 and NT
; clients can connect to the Samba server with no problems.
encrypt passwords = true
passdb backend = smbpasswd guest

; It's always a good idea to use a WINS server. If you want this server
; to be the WINS server for your network change the following parameter
; to "yes". Otherwise leave it as "no" and specify your WINS server
; below (note: only one Samba server can be the WINS server).
; Read BROWSING.txt for more details.
wins support = no

; If this server is not the WINS server then specify who is it and uncomment
; next line.
; wins server = 172.16.0.10

# If we receive WINS server info from DHCP, override the options above.
include = /etc/samba/dhcp.conf

; Please read BROWSING.txt and set the next four parameters according
; to your network setup. There is no valid default so they are commented
; out.
; os level = 0
; domain master = no
; local master = no
; preferred master = no

; What naming service and in what order should we use to resolve host names
; to IP addresses
name resolve order = lmhosts host wins bcast

; This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

; Name mangling options

preserve case = yes
short preserve case = yes

; This boolean parameter controlls whether Samba attempts to sync. the Unix
; password with the SMB password when the encrypted SMB password in the
; /etc/samba/smbpasswd file is changed.
unix password sync = false

; For Unix password sync. to work on a Debian GNU/Linux system, the following
; parameters must be set (thanks to Augustin Luton
; <aluton@hybrigenics.fr> for sending the correct chat script for
; the passwd program in Debian Potato).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .

; The following parameter is useful only if you have the linpopup package
; installed. The samba maintainer and the linpopup maintainer are
; working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

; The default maximum log file size is 5 MBytes. That's too big so this
; next parameter sets it to 1 MByte. Currently, Samba rotates log
; files (/var/log/{smb,nmb} in Debian) when these files reach 1000 KBytes.
; A better solution would be to have Samba rotate the log file upon
; reception of a signal, but for now on, we have to live with this.
max log size = 1000

obey pam restrictions = yes

; Some defaults for winbind (make sure you're not using the ranges
; for something else.)
; winbind uid = 10000-20000
; winbind gid = 10000-20000
; template shell = /bin/bash

; ISOLATIN1 with euro sign
unix charset = iso-8859-15
display charset = iso-8859-15
dos charset = 850

[homes]
comment = Home Directories
browseable = no

; By default, the home directories are exported read only. Change next
; parameter to "no" if you want to be able to write to them.
read only = no

; File creation mask is set to 0700 for security reasons. If you want to
; create files with group=rw permissions, set next parameter to 0775.
create mask = 0775

; Directory creation mask is set to 0700 for security reasons. If you want to
; create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0775

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
guest ok = no
read only = no
write list = knoppix

[printers]
printer admin = knoppix
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = no
writable = no
create mode = 0700

[cdrom]
comment = /mnt/auto/cdrom
browseable = yes
path = /mnt/auto/cdrom
writeable = yes
preexec = /bin/mount /mnt/auto/cdrom
postexec = /bin/umount /mnt/auto/cdrom
[hda1]
comment = /mnt/hda1
browseable = yes
path = /mnt/hda1
writeable = yes
preexec = /bin/mount /mnt/hda1
postexec = /bin/umount /mnt/hda1
[hdb1]
comment = /mnt/hdb1
browseable = yes
path = /mnt/hdb1
writeable = yes
preexec = /bin/mount /mnt/hdb1
postexec = /bin/umount /mnt/hdb1
[hdc5]
comment = /mnt/hdc5
browseable = yes
path = /mnt/hdc5
writeable = yes
preexec = /bin/mount /mnt/hdc5
postexec = /bin/umount /mnt/hdc5
 
Old 06-12-2005, 09:47 AM   #8
buddhahat
Member
 
Registered: Sep 2003
Distribution: Slackware 10, FreeBSD 6.2, Ubuntu 7.04
Posts: 60

Original Poster
Rep: Reputation: 15
I got it working!!! Thanks to everyone for your help!
 
Old 06-20-2005, 01:33 PM   #9
hlslaughter
Member
 
Registered: May 2003
Location: San Jose, CA
Distribution: Ubuntu
Posts: 47

Rep: Reputation: 15
god i hate it when people don't post the fixes!!!
 
Old 06-20-2005, 01:43 PM   #10
buddhahat
Member
 
Registered: Sep 2003
Distribution: Slackware 10, FreeBSD 6.2, Ubuntu 7.04
Posts: 60

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by hlslaughter
god i hate it when people don't post the fixes!!!
Here is the smb.conf file I used:

Code:
[global]
workgroup = WORKGROUP
server string = SERVERNAME
guest account = nobody
invalid users = root
security = user
encrypt passwords = true
passdb backend = smbpasswd guest
wins support = no

[test]
comment = testing directory
browseable = yes
writeable = yes
path = /tmp
Use the steps above to add a user:

Quote:
Originally posted by Keithj

sudo adduser --force-badname Computer1
and give it a password
smbpasswd -a Computer1
and password again.
The key was setting "security = user" and setting up a user. Check out the samba docs for more on security.

Good luck.

Last edited by buddhahat; 06-20-2005 at 01:51 PM.
 
Old 06-20-2005, 02:54 PM   #11
hlslaughter
Member
 
Registered: May 2003
Location: San Jose, CA
Distribution: Ubuntu
Posts: 47

Rep: Reputation: 15
ah, thanks.

unfortunately that fix doesn't apply to me

i made the mistake of installing FC4
 
Old 06-20-2005, 03:01 PM   #12
buddhahat
Member
 
Registered: Sep 2003
Distribution: Slackware 10, FreeBSD 6.2, Ubuntu 7.04
Posts: 60

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by hlslaughter
ah, thanks.

unfortunately that fix doesn't apply to me

i made the mistake of installing FC4
What problem are you having?
 
  


Reply



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
XP Client Returns 'Access is Denied' Error When Trying to Connect to a Samba Server BuckRogers01 Linux - Networking 1 05-25-2005 11:55 AM
can not connect to my pureftp server from Linux client, but i can from windows client bonito SUSE / openSUSE 5 03-16-2005 09:45 PM
Samba:Unable to connect shares from win2k client vikram_cvk Linux - Software 8 03-22-2004 12:14 AM
Samba:Unable to connect shares from win2k client vikram_cvk Linux - Software 0 01-13-2004 06:03 AM
Joining Win2k client to a samba PDC seaver Linux - Networking 3 08-07-2003 09:34 AM

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

All times are GMT -5. The time now is 07:15 PM.

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
Open Source Consulting | Domain Registration