Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 829
  • Last Modified:

Using smbmount question

Dear all experts,
I've install the samba server in my linux, when I want to mount the window
dirves(localed at another PC)
I use smbmount
and the command I type is
smbmount file://192.168.4.2/C$/temp/ /windoc
but it returns the error mesage is
(192.168.4.2 is a window 2000 professional host)
1969: tree connect failed: ERRDOS - ERRnosuchshare (You specified an invalid
sha
re name)
SMB connection failed
I've check that temp diectory in C:/ is shared with the share name is temp
why I still have mount it
Thank you for reading my question
Howard

0
howard_chan33
Asked:
howard_chan33
2 Solutions
 
MFCRichCommented:
Don't specify C drive -- just temp

> smbmount file://192.168.4.2/temp /windoc


0
 
elniniokevCommented:


The first thing you will probably want to do, is check to see what directories are shared on the computer you are trying to mount off of. To do this type smbclient -L computername. This will list
all the directories shared by the machine. To mount the directory, we use the command smbmount. Smbmount can be a little tricky though. I have created a script, named smb, that allows users to
mount drives using smbmount, with relative ease.

   #usage  smb computername sharename
   #!/bin/sh
   if [ $UID = 0 ]; then
      if [ ! d /mnt/$1 ]; then
         mkdir /mnt/$1
      fi
   #You may want to add the -u option here also if you need to
   #specify a login id (ie: mounting drives on Windows NT)
      /usr/sbin/smbmount //$1/$2 /mnt/$1 I $1 c etc
   else
      if [ ! d ~/mnt/ ]; then
         mkdir ~/mnt/
      fi
      if [ ! d ~/mnt/$1 ]; then
         mkdir ~/mnt/$1
      fi
   #You may want to add the -u option here also if you need to
   #specify a login id (ie: mounting drives on Windows NT)
      /usr/sbin/smbmount //$1/$2 ~/mnt/$1 I $1 c etcfi

To execute this script you simply type smb followed by the name of the computer you are mounting off of, and then the directory you wish to mount (ex. smb workstation files). If you are root, the
script creates a directory in /mnt by the same name as the computer, and mounts the directory there. For any other user, the script makes a directory in the users home directory named mnt. In
that directory it makes another directory by the same name as the computer and mounts the share there.
0
 
WhaleCommented:
> smbmount file://192.168.4.2/temp /windoc

should be ok, but I think that you can remove the "file:"

and
you can also do it with the mount command if you have smbfs in your kernel, so you can add it to your /etc/fstab too :)
mount -t smbfs -o user=guest //192.168.4.2/temp /windoc

have fun
++
0
 
CleanupPingCommented:
howard_chan33:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
paullamhkgCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is to:

Points split between MFCRich and elniniokev

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Paul
EE Cleanup Volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now