Solved

Using smbmount question

Posted on 2002-05-20
6
821 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
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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Removing DES and 3DES ciphers in linux RedHat 6.8 38 99
Virtualizing very old guest OS 4 80
nagios 4 php error after installation 6 79
how to rebuild XFS volume from LV 19 40
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

867 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

21 Experts available now in Live!

Get 1:1 Help Now