LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   network neighborhood (http://www.linuxquestions.org/questions/linux-networking-3/network-neighborhood-135544/)

johnorban 01-16-2004 04: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 07:52 PM

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

To list all the shares on a PC, use:
Code:

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

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

To mount a shared directory, use:
Code:

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

dellcom1800 01-16-2004 10: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 10:43 PM

let me no if that helped

johnorban 01-18-2004 05:13 PM

host not found
 
From Nautilus I get:

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

From bash shell I get:

1.) smbclinet -L 3.31.189.203 -U root

added interface ip=3.31.189.201 bcast=3.31.191.255 nmask=255.255.252.0
error connecting to 3.31.189.203:139 (Connection refused)
Error connecting to 3.31.189.203 (Connection refused)
Connection to 3.31.189.203 failed

2.) smbmount //3.31.189.203/usr/share /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:

ping 3.31.189.203

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

--- 3.31.189.203 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 07:06 PM

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

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

smb://My_Computer_Name/share"
Quote:

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

Quote:

< 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:
Code:

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

johnorban 01-19-2004 10: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?

quote:
to list all the shares on a PC, use:

code:smbclient -L computername -U user

Mathieu 01-19-2004 07: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.
Code:

[global]
        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 11:05 AM.