LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   cant browse network (https://www.linuxquestions.org/questions/linux-networking-3/cant-browse-network-460768/)

aerojazz 07-04-2006 12:04 AM

cant browse network
 
hi,

I just freshly installed Scientific Linux for testing on my machine. I got a problem browsing windows network, i cant see any machine that are connected to our small ofc network. Can somebody help me. I'm just wondering why it does not work...actually i tested FC5 yesterday and able to easily browsed our windows network.Thanks!

aerojazz

DaneM 07-04-2006 02:07 AM

Hi, aerojazz.

I'm not very familiar with Scientific Linux, but I can tell you a few things that will help you in general.

First, can you ping any of the other computers? Go into a command line (terminal) and type, "ping <IP address>". If it gives you replies, you're in good shape. If not, try pinging this computer's address. You can find out what it is by typing "ipconfig" in the terminal. If that works, your network device is working properly (most likely). If not, you have a hardware setup problem and will need more help specifically on that (I'm willing to try :-).

Second, make sure that your smbd and nmbd daemons are running. Do "ps aux | grep nmbd" and "ps aux | grep smbd" in a terminal. If they are running, move onto the next step. If not, you'll need to start them up (look for a startup script in /etc/init.d).

Now, I'll need to know some things about your network. Do you have a domain? Are you using workgroups? How are IP addresses assigned? Do you have WINS (local hostname resolution) enabled? Try doing this (in a terminal): "nmblookup <hostname>", and "smbclient -L <IP address>".

Please post the answers to these questions, the output of these commands, and the contents of "/etc/samba/smb.conf". Hopefully that will give me (us) enough fodder to help you solve your problem.

--Dane

archtoad6 07-04-2006 06:04 AM

Great reply Dane, taught/reminded me of couple of things.

If I may make a minor suggestion,
Quote:

Originally Posted by DaneM
Second, make sure that your smbd and nmbd daemons are running. Do "ps aux | grep nmbd" and "ps aux | grep smbd" in a terminal. --Dane

Code:

ps aux | grep mbd
will find both daemons at once.

DaneM 07-04-2006 04:57 PM

Good call, Rick :-)

aerojazz 07-09-2006 09:36 PM

Hi Guys,

Sorry for the late reply:

Here are the outputs of the commands:

nmblookup xxxxx.domain.com
querying xxxxx.domain.com on 10.0.0.255
name_query failed to find name xxxxx.domain.com

smbclient -L 10.0.0.9
Error connecting to 10.0.0.9 (No route to host)
Connection to 10.0.0.9 failed

for my smb.conf:

# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = spss

# server string is the equivalent of the NT Description field
server string = Samba Server

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.

# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = /etc/printcap
load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
; printing = cups

# This option tells cups that the data has already been rasterized
cups options = raw

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/%m.log
# all log information in one file
# log file = /var/log/samba/smbd.log

# Put a capping on the size of the log files (in Kb).
max log size = 50

# Security mode. Most people will want user level security. See
# security_level.txt for details.
# Use password server option only with security = server
; password server = <NT-Server-Name>

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
; password level = 8
; username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
; encrypt passwords = yes
; smb passwd file = /etc/samba/smbpasswd

# The following are needed to allow password changing from Windows to
# update the Linux system password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
; unix password sync = Yes
; passwd program = /usr/bin/passwd %u
; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

# Unix users can map to different SMB User names
; username map = /etc/samba/smbusers

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /etc/samba/smb.conf.%m

# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24

# Configure remote browse list synchronisation here
# request announcement to, or browse list sync from:
# a specific host or from / to a whole subnet (see below)
; remote browse sync = 192.168.3.25 192.168.5.255
# Cause this host to announce itself to local subnets here
; remote announce = 192.168.1.255 192.168.2.44

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
; domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; preferred master = yes

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U

# All NetBIOS names must be resolved to IP Addresses
# 'Name Resolve Order' allows the named resolution mechanism to be specified
# the default order is "host lmhosts wins bcast". "host" means use the unix
# system gethostbyname() function call that will use either /etc/hosts OR
# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
# and the /etc/resolv.conf file. "host" therefore is system configuration
# dependant. This parameter is most often of use to prevent DNS lookups
# in order to resolve NetBIOS names to IP Addresses. Use with care!
# The example below excludes use of name resolution for machines that are NOT
# on the local network segment
# - OR - are not deliberately to be known via lmhosts or via WINS.
; name resolve order = wins lmhosts bcast

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
; wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no

# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
; preserve case = no
; short preserve case = no
# Default case is normally upper case for all DOS files
; default case = lower
# Be very careful with case sensitivity - it can break things!
; case sensitive = no

#============================ Share Definitions ==============================
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/false
username map = /etc/samba/smbusers
password server = None
winbind use default domain = no
[homes]
comment = Home Directories
browseable = no
writeable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /home/netlogon
; guest ok = yes
; writable = no
; share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /home/profiles
; browseable = no
; guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
printable = yes

# This one is useful for people to share files
;[tmp]
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; read only = yes
; write list = @staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /homes/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %u option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
; comment = PC Directories
; path = /usr/pc/%m
; public = no
; writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765


[local]
path = /usr/local

Again Thanks,
aerojazz

DaneM 07-10-2006 01:03 AM

No problem. For future reference, please use "CODE" tags when you paste from files. Just highlight the text and click the "#" on the reply window.

It looks like either you are not connected to the other computers at all (at least not on the software level), or the smb/nmb daemons are not running. Without the output of the ping and ps commands I requested, I can't tell which it is, though.

Also, in the [Global] section, you should have something that says, "security = x", where x is either "share", "user", or "domain". If you just installed Fedora and it worked without doing any configuring, you probably want "share". Also in the global section, you want to un-comment (remove the ";" from) the item, "wins support = yes". That will allow the computer to function as an ad-hoc wins server, enabling domain name resolution on the local network.

Please post the output of the following commands:

Code:

ping <IP address of a computer on the network>
Code:

ifconfig
Code:

route
Code:

ps aux | grep mbd
Have a good one.

--Dane

aerojazz 07-12-2006 04:07 AM

cant browse network
 
hi,

here's the output of the following commands:

Code:

ping <IP address of a computer on the network>
PING 10.0.0.9 (10.0.0.9) 56(84) bytes of data.
64 bytes from 10.0.0.9: icmp_seq=0 ttl=128 time=0.468 ms
64 bytes from 10.0.0.9: icmp_seq=1 ttl=128 time=0.283 ms
64 bytes from 10.0.0.9: icmp_seq=2 ttl=128 time=0.332 ms
64 bytes from 10.0.0.9: icmp_seq=3 ttl=128 time=0.334 ms

Code:

ifconfig
eth0 Link encap:Ethernet HWaddr 00:05:5D:35:9A:F0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0xc000

eth1 Link encap:Ethernet HWaddr 00:D0:68:01:BB:68
inet addr:10.0.0.14 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3436 errors:0 dropped:0 overruns:0 frame:0
TX packets:1842 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:743408 (725.9 KiB) TX bytes:280442 (273.8 KiB)
Interrupt:10 Base address:0xc400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2165 errors:0 dropped:0 overruns:0 frame:0
TX packets:2165 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2038055 (1.9 MiB) TX bytes:2038055 (1.9 Mb)

Code:

route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth1
default 10.0.0.138 0.0.0.0 UG 0 0 0 eth1

Code:

ps aux | grep mbd
root 4118 0.0 1.0 10608 2720 ? Ss 04:30 0:00 smbd -D
root 4119 0.0 1.0 10608 2704 ? S 04:30 0:00 smbd -D
root 4123 0.0 0.8 7720 2000 ? Ss 04:30 0:00 nmbd -D
root 4740 0.0 0.2 5392 676 pts/4 S+ 05:00 0:00 grep mbd


by the way, i tried to mapped my linuxbox from windows, all i can see is the linuxserver but cant browse the folders in it.heres the content of my smb.conf:

[global]
workgroup = SPSS
server string = Samba Server
password server = None
username map = /etc/samba/smbusers
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
dns proxy = No
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
cups options = raw

[homes]
comment = Home Directories
read only = No
browseable = No

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

[public]
comment = public files
path = /home/public
read only = No
guest ok = Yes

[louie]
comment = Louie's Folder
path = /home/louie
valid users = louie
read only = No

Thanks for the your time helping,
aerojazz

DaneM 07-12-2006 01:46 PM

Thanks for posting that info; it helped me eliminate a couple of possibilities.

I'm not sure that the following lines are necessary; unless you put them there on purpose (and know what you are doing with them :-) they may be messing your setup up:

Code:

dns proxy = No
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431

Try commenting them out (by putting a "#" in front of them) and restarting your samba daemons. There should be a script in /etc/init.d for restarting them. It'll probably be called, "smb", or "samba", or some such. To use it, type this:

Code:

/etc/init.d/<name> restart
Replace "<name>" with the name of the script.

Another thing I noticed is that it looks like you have it set up in user level security. This is only OK if you want to maintain ownership of files and permissions. If you don't care who on the network accesses your files, then you should put this line into your smb.conf and then restart the daemons (using the /etc/init.d script):

Code:

security = share
Let me know how that works for you.

--Dane

aerojazz 07-13-2006 12:59 AM

cant browse network
 
Hi

Here's my new smb.conf:

# Global parameters
[global]
workgroup = SPSS
server string = Samba Server
security = SHARE
password server = None
username map = /etc/samba/smbusers
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
wins support = Yes
cups options = raw

[homes]
comment = Home Directories
read only = No
browseable = No

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

[public]
comment = public files
path = /home/public
read only = No
guest ok = Yes

[louie]
comment = Louie's Folder
path = /home/louie
valid users = louie

As what you have said, I restarted the service smb with the command:

Code:

/sbin/service smb restart
Shutting down SMB services: [ OK ]
Shutting down NMB services: [ OK ]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]

then check my Windows box if I can browse the content of my Samba Server (Acreinc), but to no avail.It says

\\Acreinc is not accessible, pls contact your system administrator.

aerojazz

DaneM 07-13-2006 01:36 AM

Your smb.conf is looking better now, although I hope you backed-up your old one just for good measure.

Sometimes Windows boxes have a hard time accessing shares by name. Try accessing it by IP address (i.e. \\10.0.0.14\ for example). If that works, then it's a WINS problem, and possibly a matter of which computer on the network is getting picked as the Master Browser. Sometimes it can take over 30 minutes for a new computer to get onto the Master Browser's browse list. The easiest way to make sure that your Linux box is the Master Browser is to add a line like this into the global section of your smb.conf:

Code:

os level = 66
If my memory serves me correctly, that should make all the computers on the network treat your Linux box like an NT server.

Also make sure that you can ping your Linux box from your Windows box. To do that, you can go into "Start -> Run" and type, "cmd". Then at the command prompt, you can type, "ping <IP address of Linux computer>". It should ping 4 times. If that works, then at least the computers can mutually talk to each other.

There are a couple of REALLY good online books that you can look at in the mean time:

http://us1.samba.org/samba/docs/man/...TO-Collection/
http://samba.org/samba/docs/man/Samba-Guide/

I own both of those books in hard copy, and although I've only read enough to get my own network set up how I like it (share level security), I imagine that there's a lot of other good stuff in there as well. If I were you, I would try to find a setup that closely resembles yours in Samba 3 By Example, and use the other one for reference.

Keep me posted and I'll do what I can to help.

--Dane

aerojazz 07-13-2006 03:05 AM

cant browse network
 
Hi Dane,

Wohoo. I think the problem is in my firewall config. A while ago, I stopped my firewall and alas, able to browse my shared folders (in the samba server) from my windows box with this command:

Code:

/sbin/service iptables stop
My problem is, I still like to set my firewall on, for security measures...any idea on configuring my iptables so that all my windows box can see the contents of shared folders in my linuxbox?

by the way here's my iptables:

Quote:

# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 28043 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 5093 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
by the way, thanks for the links of online books.I'll study it by then.I'll try adding your suggestion on smb.conf regarding
Code:

os level = 66
Thanks for helping,
aerojazz

DaneM 07-13-2006 05:23 PM

Woohoo! I'm glad it works, even if you had to disable the firewall to make it work. I should have thought of that sooner :-).

I'm not really good at writing IPTables scripts, but basically here's what you need to do. Using the utility that generated that script (system-config-securitylevel), you need to add rules that do the following:

1) Allow all incoming connections FROM ports 137-139, and 445, TCP and UDP.
2) Allow all incoming packets FROM UDP port 137, TO UDP ports 1024-65535. Alternatively (which may or may not work), you can make a rule that allows all ESTABLISHED and RELATED packets originating from a local packet destined for UDP port 137. This latter method is more secure, but doesn't work on all configurations, and can be a pain to set up.

I've never used Scientific Linux or its firewall setup tool, but hopefully it will be pretty straight-forward.

Have a good one, and let me know how that goes.

--Dane

aerojazz 07-14-2006 01:53 AM

cannot browse network
 
Hi Dane,

I've tried to edit my system-config-securitylevel but somehow my iptables were not updated. Do i need to run some scripts to make it updated?and how...Thanks!

aerojazz

DaneM 07-14-2006 02:04 AM

Hello.

It might not have re-run your iptables script. Try looking in /etc/init.d/ for something having to do with iptables and/or system-config-securitylevel. To re-run it, you should do something like this:

Code:

/etc/init.d/<scriptname> restart
We're really close to fixing this; keep up the fight! :-D

--Dane

Nishant Desai 07-14-2006 03:00 AM

May I ask for the help?
 
Hey Guys,
This is really a good post, if anybody wants to look for starting the server, thanks to Dane for such a good reply, and hey aerojazz congrats to u also for getting success, now may i ask for the help???
I want to ask that how can i disable my firewall? i am using RHL9 and want to see the computers of our network from my Linux desktop, uptil yesterday i was able to do so, but today i m not and it is showing an error and though uptil yday i can access any of PCs by writing there name in the network servers by writing SMB:///<PC Name>, i couldnt paste the data in any of the folders of any the PCs, can you please help me to come out of this problem and to access my domain or either if i can paste the data into one of the PCs.

Thanks in advance,
Nishant


All times are GMT -5. The time now is 11:30 AM.