LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-09-2011, 04:57 PM   #1
linux hates me
Member
 
Registered: May 2009
Distribution: fedora 14 and CentOS 5.5
Posts: 71

Rep: Reputation: 15
Cant connect to samba share from windows


Ok I am setting up samba on my CentOS server for the first time. I am using webmin to configure samba.

Here is the smb.conf

Code:
[global]
	netbios name = KISKA
	cups options = raw
	load printers = yes
	server string = 
	default = global
	workgroup = NUS
	os level = 20
	null passwords = yes
	username map = /etc/samba/user.map
	encrypt passwords = yes
	security = user
	passdb backend = tdbsam


[Web]
	guest account = Staff
	delete readonly = yes
	writeable = yes
	path = /var/www/nusalaska/html
	force group = Tech
	revalidate = yes
	force user = Tech
	valid users = Admin,Staff,Tech,@Admin,@Tech,@staff
	public = yes
	create mode = 777
	directory mode = 777
I can see the domain name "KISKA" in the "network" tab of windows explorer, however when I click on it I get this error:

Windows cannot access \\KISKA
check the spelling of the name. otherwise there might be a problem with your network.

Under the details of this error I get this:
"The network path was not found"

Also I have stopped iptables so it cant be firewalled

Last edited by linux hates me; 03-09-2011 at 05:05 PM.
 
Old 03-09-2011, 05:18 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Is kiska the actual host name of your linux box? Try accessing your box using its IP address instead of the host name to see if that's the problem.
 
Old 03-09-2011, 05:45 PM   #3
linux hates me
Member
 
Registered: May 2009
Distribution: fedora 14 and CentOS 5.5
Posts: 71

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by corp769 View Post
Is kiska the actual host name of your linux box? Try accessing your box using its IP address instead of the host name to see if that's the problem.
Ok

1) I tried mapping a network drive using both the domain name "Kiska" and the ip address with no luck
2) I can ping the box using the ip address (used above) and I get a good response
3) How do I change the Actual host name? Is that not a part of Samba?
 
Old 03-09-2011, 06:19 PM   #4
alan99
Member
 
Registered: Mar 2010
Distribution: Debian
Posts: 180

Rep: Reputation: 31
your server string is empty. Try something like "server string = %h" that should should assign your hostname to the Netbios name that is broadcasts. Also try adding hosts allow = 127.,192.168.1. (substituting your correct LAN subnet for 192.168.1. ) to the global section. Also the "remote announce = 192.168.1.255 (or the proper broadcast address for you subnet) will tell it were to broadcast it's presence so the client can 'see' it.
 
Old 03-09-2011, 06:44 PM   #5
linux hates me
Member
 
Registered: May 2009
Distribution: fedora 14 and CentOS 5.5
Posts: 71

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by alan99 View Post
Also try adding hosts allow = 127.,192.168.1. (substituting your correct LAN subnet for 192.168.1. )
I dont exactly understand what you wrote here, there seems to be a period then a comma after 127. Is that comma supposed to be there?? was the 127 supposed to be after the 192.168.? what you wrote just doesnt seem logical.

Also, I added %h to the server string and Now I can connect by mapping a hard drive, however it rejects any username and password I enter. I have tried both usernames and passwords from my windows computer and the Usernames and passwords set in samba (they are identical and are kept updated by the unix usernames and passwords) and It wont let me access the share using any of them.

thanks for your help so far!
 
Old 03-09-2011, 09:35 PM   #6
linux hates me
Member
 
Registered: May 2009
Distribution: fedora 14 and CentOS 5.5
Posts: 71

Original Poster
Rep: Reputation: 15
anyone??
 
Old 03-16-2012, 03:21 PM   #7
liquidhorse
LQ Newbie
 
Registered: Mar 2012
Posts: 1

Rep: Reputation: Disabled
smbpasswd

Not sure if it still matters, but I've noticed in my experiences that even if the samba passwords are kept in sync with unix, you still often have to "smbpasswd -a" your user before samba will acknowledge. Just my experience...might be some configuration settings I never change from the defaults!
 
Old 03-16-2012, 03:23 PM   #8
evilputty
LQ Newbie
 
Registered: Mar 2012
Posts: 18

Rep: Reputation: Disabled
Quote:
Originally Posted by linux hates me View Post
I dont exactly understand what you wrote here, there seems to be a period then a comma after 127. Is that comma supposed to be there?? was the 127 supposed to be after the 192.168.? what you wrote just doesnt seem logical.

Also, I added %h to the server string and Now I can connect by mapping a hard drive, however it rejects any username and password I enter. I have tried both usernames and passwords from my windows computer and the Usernames and passwords set in samba (they are identical and are kept updated by the unix usernames and passwords) and It wont let me access the share using any of them.

thanks for your help so far!
indicates a range within the ip
 
Old 03-16-2012, 03:34 PM   #9
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Here's my smb.conf, for what it's worth. This machine has been happily running Samba for about a year, with two Win7 machines accessing it on a daily basis, never a failure, never needed to reconfigure.

Machine is running OpenSUSE 11.4

Code:
# Samba config file created using SWAT
# from UNKNOWN (127.0.0.1)
# Date: 2011/05/03 15:44:53

[global]
        map to guest = Bad User
        name resolve order = bcast host lmhosts
        printcap name = cups
        add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s  /bin/false %m$
        logon path = \\%L\profiles\.msprofile
        logon drive = P:
        logon home = \\%L\%U\.9xprofile
        domain master = No
        hosts allow = 192.168.101.
        cups options = raw
        netbios name = craig
        wins support = No
        workgroup = WORKGROUP
        usershare max shares = 100


[raid]
        comment = raid
        path = /home/raid
        read only = No
        guest ok = Yes
        inherit acls = Yes
 
Old 03-16-2012, 03:47 PM   #10
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi linux hates me,

Did you check selinux status on CentOS machine. By default selinux is set to run in targeted mode. If it is set to targeted then check Samba booleans using the following command:

Code:
getsebool -a | egrep '(smb)|(nmb)|(wins)|(samba)'
The machine from which you are trying to access is Windows XP or Windows 7?
 
  


Reply

Tags
connection, samba, share, windows



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
Can't connect to samba share on windows, works via ubuntu Boffy Linux - Networking 1 06-27-2008 12:18 PM
Cannot connect to Samba Server share from windows 2000 or xp pro machines dan98 Linux - Newbie 1 10-09-2007 05:14 PM
Cannot connect to Samba Server share from windows 2000 or xp pro machines dan98 Linux - Newbie 1 10-09-2007 12:53 AM
connect to windows share without samba? zuessh Linux - Software 7 01-30-2004 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:26 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
Open Source Consulting | Domain Registration