LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Do I use samba to mount networked drives? (https://www.linuxquestions.org/questions/linux-networking-3/do-i-use-samba-to-mount-networked-drives-3599/)

jondowd 06-22-2001 12:38 AM

Do I use samba to mount networked drives?
 
I have two computers on my desk at my job. My Linux box has two NICs and my MS windows box obtains a DHCP internet connection from eth1 (I'm a newbie, a friend set it up).

I'd like to mount the drives in the MS windows box but don't know where to start.

It's really fun to be able to use my linux box at home and log into my linux box at work using ssh, but how can I see the files that are a few inches away on the MS windows box?

I am running Mandrake 8.0

Thanks, Jon

Wazza 06-22-2001 06:23 AM

Hi there.
As far as I know, you will use Samba to mount the network drives on the Windows box.
You need Samba installed and set up, and shares enabled on the Windows box ofcourse.
To access the windows drive, log on as root on the Linux box, and use
smbmount //windows ip address/sharename /mnt/mountdir
so for me thats smbmount //192.168.0.2/c /mnt/windows
You can use the host name instead of the ip number if you have your resolv.conf set up, and create any directory in /mnt you like.
then ls /mnt/windows will list my c drive.
It's no different when telnetting into the Linux comp, although I have never used ssh, I guess it would be the same.
Im not sure if this is what you were asking, however there are some good Samba how to's out there to get you started

Good luck

Wazza

notlinus 06-22-2001 08:58 AM

The Windows box using DHCP may be an issue. Others may have a way around this, but I found that I needed the IP address of the Windows box in order to mount it in Linux. Since the Winbox is using DHCP, this address may change. My solution was to buy a Linksys router (about $100 at Circuit City or Best Buy), have it use DHCP to get its own IP, but on the LAN side of the router I use static IPs.
If you have a static IP address for the Winbox, edit the Hosts file in /etc to add the winbox. Let's say that the windows machine is called Winbox, and the share you wish to access is called WinC.
Create a "mount point" directory. Typically this would be something like /mnt/winc.
Once Hosts is modified, you can mount with:
mount -t smbfs //Winbox/WinC /mnt/winc

jondowd 06-22-2001 09:29 AM

Thank you both for your responses.

Come to think of it, the windows box is *not* using DHCP. but gets its address (static) from the linux box which is set up to do masquerading.

I'm off to Mandrake's Samba tutorial...

notlinus 06-22-2001 09:59 AM

Good idea, but - you do NOT need to use Samba to access the windows drives, only for the windows drives to access the Linux drives.

Wazza 06-22-2001 06:56 PM

oops, sorry about the "resolv.conf" error


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