LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   not able to permanently mount samba share on linux (http://www.linuxquestions.org/questions/linux-server-73/not-able-to-permanently-mount-samba-share-on-linux-844151/)

piyusharora420 11-14-2010 12:51 AM

not able to permanently mount samba share on linux
 
my samba server is working properly but i want to mount it permanently on linux (red hat) client.i have tried /etc/fstab and also autofs service but both are not working for me.
1. /etc/fstab
i made the following entry in it
//192.168.0.254/myshare /temp smbfs credentials=/root/pass 0 0

and when i use comman mount -a it shows "unknown filesystem smbfs"
why this is so?

2. using autofs
my auto.master file is shown below

#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
misc /etc/auto.misc
/net -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
/rhome /etc/auto.misc
~
~
"/etc/auto.master" 21L, 587C




my auto.misc file is shown below


#
# $Id: auto.misc,v 1.2 2003/09/29 08:22:35 raven Exp $
#
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom

# the following entries are samples to pique your imagination
#linux -ro,soft,intr ftp.example.org:/pub/linux
#boot -fstype=ext2 :/dev/hda1
#floppy -fstype=auto :/dev/fd0
#floppy -fstype=ext2 :/dev/fd0
#e2floppy -fstype=ext2 :/dev/fd0
#jaz -fstype=ext2 :/dev/sdc1
#removable -fstype=ext2 :/dev/hdd
nis1 -rw,soft,intr 192.168.0.254:/rhome/nis1
samba -fstype=smbfs,username=vinita,password=redhat ://192.168.0.254/myshare



please tell me where i am wrong?

Simon Bridge 11-14-2010 03:01 AM

You use cifs to mount samba shares, not smbfs.
http://www.samba.org/samba/docs/man/...nt.cifs.8.html
http://wiki.samba.org/index.php/Moun..._a_unix_client

piyusharora420 11-15-2010 02:39 AM

thax alot
it works.

piyusharora420 11-15-2010 03:17 AM

i have mounted successfully using autofs.but i umount it using command umount.cifs /misc/samba now how to remount it?

Simon Bridge 11-15-2010 07:17 AM

mount -a

zQUEz 11-15-2010 12:48 PM

if you mounted using autofs, then to remount it, just try and reaccess the share - `cd /misc/samba`


All times are GMT -5. The time now is 08:16 PM.