Forum Home
Press F1
 
Thread ID: 37329 2003-09-04 03:30:00 Connecting Linux computer to Windows computer david.castle (1761) Press F1
Post ID Timestamp Content User
172935 2003-09-04 03:30:00 m trying to mount a network "windows" drive but am having no success. Maybe my computer does not see the networked computer?

I am using Mandrake 9.1 on a desktop computer and am trying to connect to a Laptop running Windows ME. Both computers are connected to a router (which is connected to a cable modem). Both computers can contact the internet OK.

The laptop computer is called "Laptop" and it's hard disc "LAPTOP-DISC1".

The directory "\mnt\LAPTOP-DISC1" exists and was created by linux.

In my last attempt, I entered in the command line:
"mount -t vfat Laptop:/ /mnt/LAPTOP-DISC1"

and got back the error message:
"mount: special device Laptop:/ does not exist" which tends to indicate that the deskktop can not see the laptop. Maybe it is being blocked by the router? Or have I simply got the mount instruction all wrong.

I can see no relevant entry in \dev\. Should there be one?

If I change to \mnt\LAPTOP-DISC1 and try and list files by "ls -l" i get nothing.

I have also trid connecting using Samba. Screen shot and result is as follows:
[root@localhost mnt]# samba start
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@localhost mnt]# smbmount //Laptop/LAPTOP-DISC1 /mnt/LAPTOP-DISC1

timeout connecting to 203.96.152.100:139
Error connecting to 203.96.152.100 (Operation already in progress)
4171: Connection to Laptop failed
SMB connection failed
[root@localhost mnt]#

So again it apears that the desktop can not find the laptop.


Thanks,
David
david.castle (1761)
172936 2003-09-04 05:12:00 You're going to want to try this:

# mkdir /mnt/smb
# mkdir /mnt/smb/laptop
# chmod -R /mnt/smb

Now, you're going to want to mount it like this:
# mount -t smbfs -o username=Doze_username,password=Doze_password //192.168.0.XXX/Sharename_here /mnt/smb/laptop

Here's an explanation of it:
the 'mkdir' is obviously making the folders to mount it, and chmod -R is setting /mnt/smb and all sub-files/folders R/W for all users

Next, there's mounting it:
If you've tried:
# man smbmount
it'll help a lot
When typing:
# mount -t smbfs
This is specifying you're going to be mounting a smb share (Windows Share drive. You dont need to specify that it may be vfat on the doze PC, as it doesnt matter.. Windows/Linux takes care of sending the data over the network, regardless of File-System).
-o username=***,password=***
This specifies you're going to be adding options (Username and password for accessing the Windows Share)
then //192.168.0.XXX/Sharename
is the IP address of the shared PC (Or even its name in place of 192.168.0.XXX) and the share you want to mount

Then there's where you want it mounted locally:
/mnt/smb/laptop


Hope this helps, post back if you need clarification!

Cheers


Chill.

PS. Try looking at the man pages for mount and smbmount!
Chilling_Silently (228)
172937 2003-09-04 05:25:00 The syntax of the mount command is critical; You can't just invent a device name . If Linux has recognised the machine and made a mount point for it, it should have also made an entry in the /etc/fstab file . If so, the command " mount /mnt/LAPTOP-DISC1" should work . :D

I'd be more inclined to call it "//Laptop/" in any smb references . . . unless your Windows disk has a directory called "C:\TOP-DISC1" .

*nix knows about machines, and knows that they have a root directory called "/" . It doesn't usually care much about any label given to the disk .
Graham L (2)
172938 2003-09-05 04:53:00 My fstab file has the line:
//laptop/LAPTOP-DISC1 /mnt/LAPTOP-DISC1 smbfs username=% 0 0
so it appears that I should be able to access the laptop.

I have tried:
mount /mnt/LAPTOP-DISC1
and got the message:
timeout connecting to 203.96.152.100:139
Error connecting to 203.96.152.100 (Operation already in progress)
2676: Connection to laptop failed
SMB connection failed


I also tired:
mount -t smbfs -o username=default, password="" //Laptop/LAPTOP-DISC1 /mnt/LAPTOP-DISC1
but got an error message indicating that the syntax is incorrect. (I have not set a user name or password on the laptop hence the "defualt" and "").

If I access the folder LAPTOP-DISC1 and list files, I get the message:
total 0
Does this mean that I am accessing the laptop but have not got the correct permissions?

I have tried:
chmod -R a+rw LAPTOP-DISC1/
No problems; but it didn't help.

I've read the manual pages for mount and smb but I can't say that I am entirely clear syntax!

Still stuck.

David
david.castle (1761)
172939 2003-09-05 06:06:00 > I also tired:
> mount -t smbfs -o username=default, password=""
> //Laptop/LAPTOP-DISC1 /mnt/LAPTOP-DISC1
> but got an error message indicating that the syntax
> is incorrect. (I have not set a user name or
> password on the laptop hence the "defualt" and "").


I've just re-setup my Windows XP Gateway PC, so if the laptop's running XP, you'll also need to run the Network Setup Wizard... dont ask why, I dont know but it works a lot better after you do.

Also, create a user on the Laptop (Even if you're not logged in as it), and give it a password, makes life easier!
Chilling_Silently (228)
172940 2003-09-08 04:04:00 Well, I about 99% there! It appears that linux would not find the laptop sometimes but will others. So I fixed that by adding it's IP address (and just hope that the router does not change it).

So my final command is:

mount.smbfs //laptop/10GBDISC /mnt/laptop -o ip=192.168.0.3

where the name of the laptop is "laptop" and name of the disc is "10GBDISC" (changed from a few days ago).

Thanks for the tip about adding a user and password. I was just wondering if I may have to do that as linux seems to be very keen on passwords.

Next task is persuade the laptop's PCMCICA card to work and for the laptop to address the desktop.
david.castle (1761)
172941 2003-09-08 05:30:00 Oh? And that worked alright for mounting? Chilling_Silently (228)
172942 2003-09-08 10:40:00 I have yet to fully explore all options. I have done so many things I am not sure what part each played!

First off I found that Zone Alarm on the laptop was blocking access. So I had to set it up to allow connection from 192.168.0.3.

The using MountDrake and Samba Mount Points, (Mandrakes GUI for mounting), I was able to mount the laptop and the disc. But doing this, I still could not access the drives. Remember that I still have the line:
//laptop.10GBDISC /mnt/laptop smbfs username=% 0 0
in the fstab file.

But doing all this, I still got an error which implied that the computer was looking for the laptop on 203.96.152.100 for some bizarre reason. Adding option ip=192.168.0.3 fixed it.

I am still to determine the exact mount command; which I hope to be able to put in fstab.
david.castle (1761)
172943 2003-09-08 12:41:00 They suggest you use:
mount -t smbfs -o [options_here]
if you check the man pages!

If you "get" the command you're after, you can always add it to /etc/rc.local instead of the fstab :-)
Chilling_Silently (228)
1