-   Linux - Networking (
-   -   network neighborhood (

johnorban 01-16-2004 05:58 PM

network neighborhood
I have file sharing setup using Samba between two identical Red Hat Linux 9 Servers. I am able to ping the other server, but I don't know how to access the files on the other server. I am thinking of something like Windows Network Neighborhood or Windows Explorer. How do I see the other server's files from the bash shell? All I am trying to do is access the Web Logic 8.1 binary install that resides on a different server. What approach should I take?

Mathieu 01-16-2004 08:52 PM

You can use the smbclient command or you can mount it.

To list all the shares on a PC, use:

smbclient -L computername -U user
To access a shared directory, use:

smbclient //computername/shared_resource_name -U user
Or you can mount it and use it like a directory.

To mount a shared directory, use:

smbmount //computername/shared_resource_name /mnt/mount_point -o username=user

dellcom1800 01-16-2004 11:42 PM

couldn't agree more

if u r in X windows in your linux box u could use Nautilus to view your samba shares

type the following in the address bar:

"smb://ipaddress or computer name/share"

(use gnome)

this only works if you have the right version of Nautilus and u have the correct packages installed.

should work with redhat 7.2 it does with 8 and 9 and i think 7 if i remember right

dellcom1800 01-16-2004 11:43 PM

let me no if that helped

johnorban 01-18-2004 06:13 PM

host not found
From Nautilus I get:

Couldn't display "smb://", becasue no host "" could be found.

From bash shell I get:

1.) smbclinet -L -U root

added interface ip= bcast= nmask=
error connecting to (Connection refused)
Error connecting to (Connection refused)
Connection to failed

2.) smbmount // /mnt/mount_point -o username=root

Could not resolve mount point /mnt/mount_point

< I am not sure what to enter for /usr/share and /mnt/mount_point

I thought I was connected because ping worked:


64 bytes from icmp_seq=1 ttl=64 time=0.147 ms

--- ping statistics ---
8 packets transmitted, 8 receieved, 0% packet loss, time 6993ms
rtt min/avg/max/mdev = 0.132/0.151/0.169/0.021 ms

Mathieu 01-18-2004 08:06 PM

My previous post contains examples. You have to use your own info.

Couldn't display "smb://", becasue no host "" could be found.
1.) smbclinet -L -U root
Use the computer's name, not the IP.
In Nautilus, use the following syntax:


Could not resolve mount point /mnt/mount_point
/mnt/mount_point must be a valid directory on the local computer.


< I am not sure what to enter for /usr/share and ...
For example, if I want to connect to a computer called LinuxPC and this computer has a share called myShare, the correct syntax is:

smbmount //LinuxPC/myShare /mnt/myDirectory -o username=root

johnorban 01-19-2004 11:53 AM

How do I find the computername? In Samba I assigned a Workgroup name and Description.
I think I need to open up the firewall. Any idea how to update the firewall settings?

to list all the shares on a PC, use:

code:smbclient -L computername -U user

Mathieu 01-19-2004 08:27 PM

In your Samba configuration file, you can specify a name using the netbios name option. It must be inserted under the Global share.

        workgroup = TUX-NET
        netbios name = Linux

If this option is not set, the default is to use the hostname of the computer. To find out the hostname, at the command line, type: hostname

In order for Samba to work correctly, you need to allow traffic on ports 137, 138 and 139 -- These are netbios ports.
In RedHat, your iptables configuration files is located at /etc/sysconfig/iptables.
To view your iptables rules, at the command line, type: iptables -vL

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