LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-04-2009, 05:57 AM   #1
Amy84
LQ Newbie
 
Registered: Aug 2009
Location: Netherlands
Distribution: CentOS 5.3
Posts: 27

Rep: Reputation: 15
Windows won't acces Samba


Hey,

I'm pretty new here and a total newbie in Linux. I'll try to explain the best I can.

I am running a couple of VM's (CentOS 5.3) on a VMWare ESX Server 3.5
Now I want to connect to certain files on my VM from a Windows Server 2003.

Last Friday I've set up a Samba and I've configured the smb.conf which was all working just fine.
Yesterday I wanted to do the exact same thing with an other of my vm's. I've have configured the smb.conf the same way, and I've double checked my user accounts.

When I try to connect it comes up with the following error:

The drive could not be mapped because no network was found.

(I'm able to ping)

For your info I've attached both my smb.conf:

This is the one working fine:

------------------------------------------------
[global]
workgroup = workgroup
netbios name = Subversion
server string = Samba Server Version %v
interfaces = lo eth0 192.168.32.208/255.255.255.0
hosts allow = 127. 192.168.32.
log level = 10
log file = /var/log/samba/%m.log
max log size = 50
security = user
;encrypt passwords = Yes
passdb backend = tdbsam

[svn]
comment = Devbh01 Backup
path = /var/svn
;read only = yes
writeable = yes
browseable = yes
force user = twadmin
force group = twadmin
guest ok = no
create mask = 0660
directory mask = 0770
--------------------------------------------------

This is the one giving me a headache

--------------------------------------------------
[global]
workgroup = workgroup
netbios name = VMArjen
server string = Samba Server Version %v
interfaces = lo eth0 192.168.32.202/255.255.255.0
hosts allow = 127. 192.168.32.
log level = 10
log file = /var/log/samba/%m.log
max log size = 50
security = user
passdb backend = tdbsam


[root]
comment = Devbh01 Backup
path = /root
writeable = yes
browseable = yes
force user = twadmin
force group = twadmin
guest ok = no
create mask = 0660
directory mask = 0770
----------------------------------------------------

Can any one please tell me what I'm doing wrong?
 
Old 08-04-2009, 06:18 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Nothing jumps out at me with your smb.conf files. Use "testparm" to test them anyway. Restart the smbd service to make sure it is running and the current service is loaded. Did you add twadmin as a samba user (using smbpasswd)? Check that twadmin has read permissions to the directory being shared.

Force User and Force Group are usually used for Guest (nobody) shares. These options are redundant if "guest ok = no" and "security = user" are used, and twadmin is the owner & group owner of the share. But this shouldn't cause access problems.

Also check the firewall settings on each virtual host.
Quote:
The drive could not be mapped because no network was found.
Is this an error message from the Windows 2000 client? Sometimes error messages don't provide the correct information. Could it mean that the port was blocked? This error could indicate the VM's or the ESX server is blocking ports 139 or 445.
 
Old 08-04-2009, 07:44 AM   #3
Amy84
LQ Newbie
 
Registered: Aug 2009
Location: Netherlands
Distribution: CentOS 5.3
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks for your reply.

Using testparm it all looks fine to me:

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

[global]
server string = Samba Server Version %v
interfaces = lo, eth0, 192.168.32.202/255.255.255.0
passdb backend = tdbsam
log level = 10
log file = /var/log/samba/%m.log
max log size = 50
hosts allow = 127., 192.168.32.

[root]
comment = Devbh01 Backup
path = /root
force user = twadmin
force group = twadmin
read only = No
create mask = 0660
directory mask = 0770

----------------------------------------------------------

Or could it be an issue that it states: Server role: ROLE_STANDALONE ?

I did restart the smbd service and I did add twadmin as a samba user (using smbpasswd). And it does have read permissions.

I check my firewall and that all seems fine. Both port 139 and 445 are open.

The error I'm getting is on my Windows Server 2003. It happens when I try the following:

Windows Explorer --> Tools --> Map Network Drive

Folder: (I write) \\192.163.32.202\root
Connect as: twadmin
 
Old 08-04-2009, 07:46 AM   #4
strick1226
Member
 
Registered: Feb 2005
Distribution: Arch, CentOS, Fedora, OS X, SLES, Ubuntu
Posts: 327

Rep: Reputation: 63
What happens if you run a "net view \\192.168.32.202" from your Windows command line? Does it list the available Samba share info, or does it give a complete failure after a long delay?
 
Old 08-04-2009, 07:53 AM   #5
Amy84
LQ Newbie
 
Registered: Aug 2009
Location: Netherlands
Distribution: CentOS 5.3
Posts: 27

Original Poster
Rep: Reputation: 15
It gives me a complete failure:

No Network provider accepted the given network path.


Not sure if it means anything but i am able to access the vm via putty (protocol SSH)
 
Old 08-04-2009, 09:19 AM   #6
Amy84
LQ Newbie
 
Registered: Aug 2009
Location: Netherlands
Distribution: CentOS 5.3
Posts: 27

Original Poster
Rep: Reputation: 15
Looking further down into my settings I noticed a difference between the two vm's (one working, the other not).

\proc\key-users

The one working states:
502 is my twadmin user
--------------------------------
0: 6 5/5 3/100 70/10000
32: 2 2/2 2/100 56/10000
43: 2 2/2 2/100 56/10000
51: 2 2/2 2/100 56/10000
68: 2 2/2 2/100 56/10000
70: 2 2/2 2/100 56/10000
81: 2 2/2 2/100 56/10000
501: 2 2/2 2/100 58/10000
502: 2 2/2 2/100 58/10000
--------------------------------

The one not working:
500 is my twadmin user (which as you'll see is missing here)
--------------------------------
0: 4 3/3 1/100 31/10000
32: 2 2/2 2/100 56/10000
43: 2 2/2 2/100 56/10000
51: 2 2/2 2/100 56/10000
68: 2 2/2 2/100 56/10000
70: 2 2/2 2/100 56/10000
81: 2 2/2 2/100 56/10000
--------------------------------

Is this possibly the problem?
If it is I have no clue how it got there in the first place. I'm only working with Linux for about a week so...
 
Old 08-04-2009, 09:38 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,603
Blog Entries: 25

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
Hi,

Do you have your '/etc/hosts,/etc/hosts.allow, /etc/host.deny and possibly '/etc/hosts.equiv' files setup properly?

Quote:
excerpt from 'man smb.conf';

hosts allow (S)

A synonym for this parameter is allow hosts.

This parameter is a comma, space, or tab delimited set of hosts
which are permitted to access a service.

If specified in the [global] section then it will apply to all
services, regardless of whether the individual service has a
different setting.

You can specify the hosts by name or IP number. For example, you
could restrict access to only the hosts on a Class C subnet with
something like allow hosts = 150.203.5.. The full syntax of the
list is described in the man page hosts_access(5). Note that this
man page may not be present on your system, so a brief description
will be given here also.

Note that the localhost address 127.0.0.1 will always be allowed
access unless specifically denied by a hosts deny option.

You can also specify hosts by network/netmask pairs and by netgroup names if your system supports netgroups. The EXCEPT keyword can
also be used to limit a wildcard list. The following examples may
provide some help:

Example 1: allow all IPs in 150.203.*.*; except one

hosts allow = 150.203. EXCEPT 150.203.6.66

Example 2: allow hosts that match the given network/netmask

hosts allow = 150.203.15.0/255.255.255.0

Example 3: allow a couple of hosts

hosts allow = lapland, arvidsjaur
...
You can be explicit with the hosts allow within 'smb.conf' but I think you should setup the '/etc/hosts, /etc/hosts.allow, /etc/host.deny and possibly '/etc/hosts.equiv' for additional security.
 
Old 08-05-2009, 04:45 AM   #8
Amy84
LQ Newbie
 
Registered: Aug 2009
Location: Netherlands
Distribution: CentOS 5.3
Posts: 27

Original Poster
Rep: Reputation: 15
I think there could be something wrong with my smbpasswd (or me doing something wrong of course).

My user is added to:

/etc/passwd
/etc/group
/etc/samba/smbusers

I did add my users to smbpasswd like this:

smbpasswd -a twadmin

Then it stated successfully

Now when I open my file using vi, the twadmin is nowhere to be found.
 
Old 08-05-2009, 06:01 AM   #9
Amy84
LQ Newbie
 
Registered: Aug 2009
Location: Netherlands
Distribution: CentOS 5.3
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks to all for trying to help.

My colleague and I looked further in to it and found it our selfs.

We had another smbpasswd file located in: usr/private, so we thought smb.conf might be looking at the wrong place.

In smb.conf we change the following in [global]:

smb passwd file = etc/samba/smbpasswd

After doing so we again tried to add a user:

smbpasswd -a user

This worked, and more we finally were able to connect from windows.
 
  


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
samba [profiles] acces denied enboig Linux - Networking 1 03-09-2009 03:24 AM
Samba, acces denied ommmmid Linux From Scratch 10 09-22-2005 03:34 AM
Network acces via name not IP + Samba Geepak Linux - Newbie 2 02-08-2005 10:28 AM
samba acces router ruben0076 Linux - Networking 2 01-22-2005 08:14 AM
Win98 cannot acces share on Samba jonabyte Linux - Software 7 12-02-2003 09:04 AM


All times are GMT -5. The time now is 08:58 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