Solved

Using smbmount question

Posted on 2002-05-20
6
820 Views
Last Modified: 2008-02-01
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
Comment
Question by:howard_chan33
6 Comments
 
LVL 4

Accepted Solution

by:
MFCRich earned 50 total points
Comment Utility
Don't specify C drive -- just temp

> smbmount file://192.168.4.2/temp /windoc


0
 
LVL 1

Assisted Solution

by:elniniokev
elniniokev earned 50 total points
Comment Utility


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
 
LVL 1

Expert Comment

by:Whale
Comment Utility
> 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
 

Expert Comment

by:CleanupPing
Comment Utility
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
 
LVL 12

Expert Comment

by:paullamhkg
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now