[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Using smbmount question

Posted on 2002-05-20
6
Medium Priority
?
831 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
5 Comments
 
LVL 4

Accepted Solution

by:
MFCRich earned 200 total points
ID: 7023873
Don't specify C drive -- just temp

> smbmount file://192.168.4.2/temp /windoc


0
 
LVL 1

Assisted Solution

by:elniniokev
elniniokev earned 200 total points
ID: 7026232


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
ID: 7028552
> 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
ID: 9089058
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
ID: 9669207
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

591 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