LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   mounting samba share (http://www.linuxquestions.org/questions/linux-general-1/mounting-samba-share-11439/)

glock19 01-09-2002 04:57 PM

mounting samba share
 
How do I use the mount command to mount a samba share on my local network? I tried looking in the man, but I couldn't figure it out.

mAineAc 01-09-2002 05:09 PM

try 'man smbmount'

theFuzzyOne 01-09-2002 08:13 PM

smbmount
 
if you are using a somewhat new version of smbmount, it could be
smbmount //computer/sharename /mnt/point
or
smbmount //computer/share /mnt/point -o ip=x.x.x.x

check the man page or other docs for other options like username/password

knobby 01-09-2002 10:14 PM

this is the way I mount samba shares on other machines:

mount -t smbfs -o username=name,password=password //machinename/sharename /mnt/smbshare

This work but I don't know if it's the best way

glock19 01-10-2002 06:45 PM

When I try this command:

Code:

mount -t smbfs //192.168.168.253/tmp /mnt/smbshare
I get the following error:

Code:

Could not resolve mount point /mnt/smbshare
Do you know what this means?

knobby 01-10-2002 06:50 PM

i means there is no /mnt/smbshare. create one first:

#mkdir /mnt/smbshare

glock19 01-10-2002 07:06 PM

Ahh ok. I thought it would just dynamically create that directory for me. Thanks, now it works.

How do I make it so I do this mount every time my linux box boots?

knobby 01-10-2002 07:11 PM

that depends on what *nix you are using. If you are using redhat, the simple way is to add that exact mount command to your /etc/rc.d/rc.local file. The right way would be to add it to /etc/fstab but I can't explain how to do that. Try doing a 'man fstab' and hack away.

theFuzzyOne 01-10-2002 08:54 PM

automount
 
or u could use the automounter... lookup autofs for details

Piro 10-01-2003 05:47 PM

ive made an sh file to mount my windows share for me... ive typed this in it...
mount -t smbfs -o username=samba,password=samba //Desktop/Public /mnt/public

ive tried everything i know, including reading the man files... i can't find smbmount either... and both dont work... ive also tried making the credentials file but nothing works... it comes out with an error of the following
mount: mount point \\Desktop\Public does not exist
./mountshares.sh: /mnt/public: is a directory

thing is, i know this directory works because when i use my other home made sh file containing
/usr/local/samba/bin/smbclient \\\\Desktop\\Public -U samba samba
it seems to work fine... and it does connect...

ive also tried to use \\\\Desktop\\Public in the original sh file to mount my shares but it doesn't seem to work, it gives me the same error...

PLEASE HELP ME!!! it seems as if its not working no matter what i try, ive also recompiled samba 3 times and each time it doesn't work...
as a note im running slackware 8.1

Looking forward to getting some help or insight on this... thanks in advance

fayazvf 07-08-2011 01:29 AM

hi,
i tried the following command
sudo mount -t smbfs 10.102.11.79:/mnt /home/user/dir

but i get the error:
mount: unknown filesystem type 'smbfs'

What could be the problem?
I have samba installed on both the linux machines.

TobiSGD 07-08-2011 04:38 AM

Try it with -t cifs instead of -t smbfs.

squirrelj 07-09-2013 11:55 PM

solution
 
Quote:

Originally Posted by TobiSGD (Post 4408636)
Try it with -t cifs instead of -t smbfs.

guys the solution is:


# mount -t cifs -o username:<username of the smb server> <nfs-server>:/<share> /mnt/<share-loc>

- dont have to add the password option as it will be prompted when the command is entered.
- make sure the package "smbmount" is installed else install it (i.e. ubuntu --> apt-get install smbmount"

e.g.

# mount -t cifs -o username:john server1:/share1 /mnt/MyShare

choronozon 07-15-2013 08:50 PM

Quote:

Originally Posted by squirrelj (Post 4987466)
guys the solution is:


# mount -t cifs -o username:<username of the smb server> <nfs-server>:/<share> /mnt/<share-loc>

- dont have to add the password option as it will be prompted when the command is entered.
- make sure the package "smbmount" is installed else install it (i.e. ubuntu --> apt-get install smbmount"

e.g.

# mount -t cifs -o username:john server1:/share1 /mnt/MyShare


After months of cifs hell, I decided the right answer was to use NFS, and never looked back :-)

OK that means you need the far end to run *nix as well...


All times are GMT -5. The time now is 05:27 PM.