LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trouble mounting Windows share (https://www.linuxquestions.org/questions/linux-newbie-8/trouble-mounting-windows-share-431150/)

luckythedonkey 04-02-2006 09:24 PM

Trouble mounting Windows share
 
Hi Guys,

I'm not exactly new to the forums but this is the first thread I've posted.

I've searched the forums for a solution on this but nothing actually works.

How do I mount a Windows network share on my linux box? I'm using Ubuntu 5.10 and I've also tried a Gentoo box. I'm sure it's a syntax problem. I can ping the box with the share but it won't hit the Windows share. Below is an example of my syntax and the error I'm getting:


mount -o user=justin 192.168.100.113:/doc/ /test/
unknown nfs mount parameter: user=0

I've also tried adding the "-t ntfs" switch. I've tried adding " " around my username but it won't allow me to do it. If I take the user=justin option out, it gives me the below error. Most likely because no username was supplied and won't authenticate.

mount: RPC: Remote system error - Connection refused

My Windows network share does definately exist and my username '
Last week I was doing Red Hat training, and I was mounting nfs shares all week as root with no problems but this is the first time I've tried mounting to my own Windows network share at home.

I'm sure it's something simple I'm missing.


Thanks
Justin

centauricw 04-02-2006 11:34 PM

You mount Windows shares using the smbmount program from the Samba package. This is because the way they connect is different and the code is not built into mount. To use the smbmount program, you can do this (borrowing from your example):

smbmount //192.168.100.113/doc /test -o username=justin

Notice that the remote share is referenced using a Windows UNC style name (with forward slashes instead of backslashes). Also you with be prompted for the Windows password at mount time unless you embed the paasword in the mount command, thus:

smbmount //192.168.100.113/doc /test -o username=justin,password=mypassword

The password will be in cleartext, so be sure the file permissions on the script where you use this are not world readable.

There are many other options, all described in the smbmount manpage.

pretty.tulip 04-03-2006 01:33 PM

Hi Justin,
Mount command can take the following form:

mount -t smbfs -o username=Justin,password //192.168.100.113/c$ /mnt/c

Notes: 1.You don't have to type password=&type the password, rather if you just typed username=justin,password, it will accept it at the moment then it will ask you about it later on & it will be encrypted.
2. the source can be in the computer name from windows, you can get it by right click on my computer & properties, there will be few tabs including computer name.
3. c$ is the partition or file you want to mount in full path & should end by ($)
4. /mnt/c is the mount point.
Good luck!


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