smbfs and fstab
Hi everybody, hope I am posting under the right forum
I am running mandrake 9.1 and trying to mount a samba file system at boot.
by now, I am doing it in a"dirty" way by adding at the end of the /etc/rc :
"smbmount //server/me /home/me/samba -o credentials=/etc/log_file,uid=me"
it works, but I am trying to include it in the /etc/fstab instead, which seems cleaner
I use the following line :
"//server/folder /home/me/samba smbfs credentials=/etc/log_file,uid=me,debug=9 0 0"
the problem is that, at boot, I get a message saying "connection failed, network unreachable"
However, right after boot, if I just type as root : "mount ~me/samba", it works :?
the strangest is that if I use the "interactive setup" at boot and then answer "yes" each time I am asked to start something, then the initialisation of the "eth0 interface" fails, but then the smbfs gets mounted without problem and I don't think I have any network problem.
On the other hand, if I answer "no" to the eth0 initialisation, then the smbfs won't get mounted. :(
Does anyone have a clue about what is happening ?
Hmmm....does eth0 get initialized before you try to mount samba?
because if you do it in fstab, I am pretty sure that your eth0 is not up and running yet, thus the problem.
When you run interactive mode, eventhough you get an error from eth0, it clearly works anyway when you choose "yes", since you can mount via samba afterwards. And naturally, if you choose "no", then you wont have a network interface and thus Samba fails.
To put things simply : I think trying to mount the Samba-thingy in fstab is a bad idea, since eth0 isn't up and running when the mounting procedure starts.
Start Samba whenever you want as long as eth0 is already up and running
(for example as you already did, at the end of rc)
i am not entorely sure about your network failing, but if you want a samba share to mount at boot u will need to add the following line to your /etc/fstab.
//server/share /media/share smbfs username=<smb user>,password=<smbuser password>,fmask=777,dmask=777 0 0
Hope this is ok. If you need ne help, pm me.
ya this is my opinion to for me I put
//m00-01/Services /mnt/g smbfs username=user,password=pass,user 0 0
:lol: i hope this will help
does that give you write access to your share? I wanted write access to mine, but only worked out how to do it with fmask and dmask whatever they are!