LinuxQuestions.org
Visit Jeremy's Blog.
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 07-07-2008, 05:27 AM   #1
slideh
LQ Newbie
 
Registered: Jul 2008
Posts: 29

Rep: Reputation: 15
Problem connecting to linux machine from Windows


Hi guys,
I am having trouble connecting to my linux_v9 Redhat machine from a windows machine across a network using a Samba share

I can ping the linux machine from the computer I'm trying to connect from and the computer is visible in the list of available computers in Windows networking when I attempt to map it to a letter. But when I attempt to connect "linuxcomputer is not accessible. Network path not found"

Any help trying to solve this problem would be greatly appreciated. I'm afraid I'm not very fuid in the language of Linux, so please go easy on me...

Many Thanks

S
 
Old 07-07-2008, 06:17 AM   #2
TalkingMarble
Member
 
Registered: May 2008
Location: Deventer, The Netherlands
Distribution: CentOS 5.0
Posts: 50

Rep: Reputation: 17
As being a newbie i also experienced the same problem. In my case the problem was caused by the linux firewall. After i disabled the linux firewall, i was able to access the samba share(http://www.linuxquestions.org/questi...ht=Samba+share).

Also be aware of SElinux when you experience permission problem after you can connect to the samba share.

I hope this will help. Good luck.
 
Old 07-07-2008, 06:42 AM   #3
slideh
LQ Newbie
 
Registered: Jul 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by As being a newbie i also experienced the same problem. In my case the problem was caused by the linux firewall. After i disabled the linux firewall, i was able to access the samba share([url
http://www.linuxquestions.org/questions/linux-newbie-8/samba-share-650993/?highlight=Samba+share[/url]).

Also be aware of SElinux when you experience permission problem after you can connect to the samba share.

I hope this will help. Good luck.

Thanks for your input TM. I too am a complete novice to this Linux malarky. I'm not sure what you mean by....

Also be aware of SElinux when you experience permission problem after you can connect to the samba share.

What is SELinux?

Many thanks
S
 
Old 07-07-2008, 07:05 AM   #4
TalkingMarble
Member
 
Registered: May 2008
Location: Deventer, The Netherlands
Distribution: CentOS 5.0
Posts: 50

Rep: Reputation: 17
SELinux has to do with security (permissions). It caused me some trouble after i solved the problem (with some help from the forum) to access the samba share. So it was merely a hint in case you might experience the same problem.

First you should look to the linux firewall settings. In my case they caused the problem not being able to access the samba share through windows explorer.

For samba you need to open some ports (do a google to find out which) or you can disable the linux firewall.
 
Old 07-07-2008, 07:50 AM   #5
slideh
LQ Newbie
 
Registered: Jul 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TalkingMarble View Post
SELinux has to do with security (permissions). It caused me some trouble after i solved the problem (with some help from the forum) to access the samba share. So it was merely a hint in case you might experience the same problem.

First you should look to the linux firewall settings. In my case they caused the problem not being able to access the samba share through windows explorer.

For samba you need to open some ports (do a google to find out which) or you can disable the linux firewall.

I tried disabling the firewall with

iptables -F

but still no joy.

Do you have any other ideas?
s
 
Old 07-07-2008, 08:17 AM   #6
TalkingMarble
Member
 
Registered: May 2008
Location: Deventer, The Netherlands
Distribution: CentOS 5.0
Posts: 50

Rep: Reputation: 17
I don't know wat iptables -F does. Maybe you could try to access the samba share after you disabled your linux firewall by executing the following command: service iptables stop.

It would also be helpful if you posted the contents of the samba configuration file (smb.conf).
 
Old 07-07-2008, 09:03 AM   #7
slideh
LQ Newbie
 
Registered: Jul 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TalkingMarble View Post
I don't know wat iptables -F does. Maybe you could try to access the samba share after you disabled your linux firewall by executing the following command: service iptables stop.

It would also be helpful if you posted the contents of the samba configuration file (smb.conf).

-F is supposed to disable the Linux firewall (flushes all rules)

Here is a copy of smb.conf....

Do you see anything in there that sticks out?



# Samba config file created using SWAT
# from localhost.localdomain (127.0.0.1)
# Date: 2008/07/07 13:28:27

# Global parameters
[global]
workgroup = UBAR
netbios name = LINUX_V9
server string = samba-2.2.7a-7.9.0
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
username map = /etc/samba/smbusers
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
guest ok = Yes
hosts allow = 172.16.10./255.255.0.0
printing = cups

[homes]
comment = Home of Linux_v9
path = /home
invalid users = %S
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
hosts allow = 172.16.10

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No

[home]
comment = Home of Linux_v9
path = /home
read only = No
guest ok = No
hosts allow = 172.16.10.

[/home]
path = /home
read only = No
 
Old 07-07-2008, 09:03 AM   #8
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6 on my desktop, Ubuntu 12.04 LTS on my server, Ubuntu 12.04 on my netbook and the wife's PC
Posts: 1,186

Rep: Reputation: 95
Although I have setup Samba many times I still often forget to establish the Samba password for my Windows account. Here is an example to create the Samba account and set the password for Samba user "joe" which is the same name as a the Windows account.

Open a command window on the Linux machine
su to become root
smbpasswd -a joe

You will then be prompted to set the password for the user. Use the same on as on the Windows PC.

See if that helps. There are a lot of tricks you can do in the /etc/samba/smb.conf configuration file with respect to passwords. If you only have a few accounts to worry about it might be easier to do the maintenance manually. When you change your password on Windows you must logon to the Linux box as the same user name and do smbpasswd to change your own account.

Hope this helps,

Ken
 
Old 07-07-2008, 09:32 AM   #9
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
Flushing rules doesn't disable the firewall, it just flushes the rules - which will cause default behavior of blocking everything.

Go to /etc/rc.d/init.d and as root execute the command ./iptables stop

That stops the firewall. However, once you get your samba problem sorted out, then you had better change the firewall rules to permit it to run.

Beyond that, you should be running something more recent than redhat 9 anyway. That distro is very old.
 
Old 07-07-2008, 09:44 AM   #10
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
I don't think that selinux was around when RH 9 was released. You shouldn't be running it anymore because it is too old.

You have three home services defined. Reduce that to one. Also run the 'testparm' command to check for errors in your smb.conf file.

You want to open ports 137-139 and port 445 in the firewall. RH9 may have a gui interface to do this in the sysconfig-security module.

Make sure that a Linux user exists for each Windows user and that the directory being shared allows the users access. ( i.e. check the directories file permissions )

Run "smbpasswd" to enter each users username & password. This will be saved in the smbpasswd file which is similar to the /etc/passwd file but uses Windows uid's. This information is used when you try to connect from a windows machine.

Restart the smb daemon after making changes: sudo /sbin/service smb restart.
 
Old 07-09-2008, 03:26 AM   #11
slideh
LQ Newbie
 
Registered: Jul 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
I don't think that selinux was around when RH 9 was released. You shouldn't be running it anymore because it is too old.

You have three home services defined. Reduce that to one. Also run the 'testparm' command to check for errors in your smb.conf file.

You want to open ports 137-139 and port 445 in the firewall. RH9 may have a gui interface to do this in the sysconfig-security module.

Make sure that a Linux user exists for each Windows user and that the directory being shared allows the users access. ( i.e. check the directories file permissions )

Run "smbpasswd" to enter each users username & password. This will be saved in the smbpasswd file which is similar to the /etc/passwd file but uses Windows uid's. This information is used when you try to connect from a windows machine.

Restart the smb daemon after making changes: sudo /sbin/service smb restart.

Thanks to all for replying to this thread. I will try your suggestions and see how it goes

Cheers
S
 
Old 07-09-2008, 03:34 AM   #12
slideh
LQ Newbie
 
Registered: Jul 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
I don't think that selinux was around when RH 9 was released. You shouldn't be running it anymore because it is too old.

You have three home services defined. Reduce that to one. Also run the 'testparm' command to check for errors in your smb.conf file.

You want to open ports 137-139 and port 445 in the firewall. RH9 may have a gui interface to do this in the sysconfig-security module.

Make sure that a Linux user exists for each Windows user and that the directory being shared allows the users access. ( i.e. check the directories file permissions )

Run "smbpasswd" to enter each users username & password. This will be saved in the smbpasswd file which is similar to the /etc/passwd file but uses Windows uid's. This information is used when you try to connect from a windows machine.

Restart the smb daemon after making changes: sudo /sbin/service smb restart.


Is there anything in particular I should be looking for when I run the testparm command?
 
Old 07-09-2008, 04:24 AM   #13
slideh
LQ Newbie
 
Registered: Jul 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
I don't think that selinux was around when RH 9 was released. You shouldn't be running it anymore because it is too old.

You have three home services defined. Reduce that to one. Also run the 'testparm' command to check for errors in your smb.conf file.

You want to open ports 137-139 and port 445 in the firewall. RH9 may have a gui interface to do this in the sysconfig-security module.

Make sure that a Linux user exists for each Windows user and that the directory being shared allows the users access. ( i.e. check the directories file permissions )

Run "smbpasswd" to enter each users username & password. This will be saved in the smbpasswd file which is similar to the /etc/passwd file but uses Windows uid's. This information is used when you try to connect from a windows machine.

Restart the smb daemon after making changes: sudo /sbin/service smb restart.

Also, I'm not quite sure how you open the ports in the firewall (can't find sysconfig-security module)

Sorry, you have come across a complete novice here.
 
Old 07-09-2008, 07:53 AM   #14
TalkingMarble
Member
 
Registered: May 2008
Location: Deventer, The Netherlands
Distribution: CentOS 5.0
Posts: 50

Rep: Reputation: 17
Maybe you should first try to make it work without the firewall. After everything is working you can then focus on the firewall settings. The linux firewall can be stopped with "service iptables stop".

Last edited by TalkingMarble; 07-09-2008 at 08:11 AM.
 
Old 07-12-2008, 05:58 AM   #15
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Either I didn't remember the correct name of the security module, or there have been a number of changes between RH9 & FC 6. I had FC6 on an old dell laptop, and my memory may be failing me. Look in /sbin/ or /usr/sbin/ for programs starting with sysconfig- or reach it from a menu item.

The testparm program will check your smb.conf file for errors. You should run it if you ever manually edit your smb.conf file. It will describe the server, and then after hitting the [ENTER] key will display the shares.
 
  


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
Restarting Windows machine stops Linux machine mounting/connecting jamespetts Linux - Networking 3 05-29-2008 03:12 AM
Connecting linux machine to windows network corbis_demon Linux - Networking 3 11-08-2004 02:47 AM
connecting to another windows machine caesarkim Linux - Networking 7 11-26-2003 12:45 PM
connecting to a Windows machine Mladek Linux - Software 2 07-12-2003 05:08 PM
Connecting Linux to a Windows ME machine amykhar Linux - Networking 2 05-08-2001 07:41 PM


All times are GMT -5. The time now is 10:42 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration