mount smb shares at boot
Hi all, again.
I've about read myself cross-eyed and I'm not making any progress. This may look like it's been asked/answered before, but I can't find it. If it has, please give me the link rather than go through the whole 'this is how you do it' explanation. The reason I have this here is that I am using Deb and I believe the resolution to my challenge has something to do with the way Deb boots up. What I want to do is mount three network shares, via Samba since I use these shares when I boot to Windows, also. I can su to root and mount them manually immediately after boot, but I'd like to not HAVE to do that. Part of why people stick with M$ products is there's just too much work being repeated when you have to reboot that Windows does automagically. I am pretty confident that this doesn't NEED to be this way, it's just a matter of identifying and editing the right configuration files or setting up a shell script that runs at boot. Either way would work for me in this instance, if I could just get it figured out. Here's my deal, I have the following in a shell script: Code:
#!/bin/bash Code:
workstation:~# ./mount.shares.sh help |
you managed to read everything out there and not once did you read about /etc/fstab???
/etc/fstab: Code:
//server/share /mnt/share smbfs username=bob,password=secret |
Quote:
In any event, I've tried the fstab route in the past and it flat hasn't cooperated. Could be an issue with my smb.conf or smbpasswd setups rather than my bootup stuff. I don't know. That's why I'm posting, and reading. |
Tried the syntax offered by acid_kewpie for fstab - I get the same results on boot as I was getting with my shell. Which shows me that I've got the syntax correct. But I still don't have the last mount occuring successfully. Am going to try shuffling the order of the lines in fstab to see if that matters. It's always been the same share that fails to mount, but I've always tried mounting them in the same order. We'll try this one again.
|
Here is my fstab:
Code:
# /etc/fstab: static file system information. Code:
$ mount Code:
# Samba config file created using SWAT |
Okay, now I'm getting somewhat frustrated. I've got two shares mounting at boot. And I have two that don't mount, for no apparent reason that I can find. Also, the two shares that are mounted are supposed to be read-write, but I can't save a file to them. I have a file I've generated in Linux that I need to transfer to Windows, which is the biggest use I get from having a Samba files server. But, when I go to save it to /mnt/common, it chokes and gives me "Error saving the document myDoc.sxw: /mnt/home/My Documents/myDoc.sxw does not exist.". Well of course it doesn't exist there, that's why I'm trying to save it there!
Anyway, if anyone has any suggestions and can get past my grumpiness, I'd love to hear from you. :mad: |
the fstab somewhat works for me but I don't have a password set for one of my shares that I want to connect to, what can I do besides add a password, so i can mount this share on boot
|
also I can use with no problem
mount -t smbfs //computer/share /directory/ -o username=guest,password="" my fstab is this //computer/share /directory smbfs ro 0 0 username=guest,password="" I also tried single quotes for the password also.... any ideas? |
//computer/share /directory smbfs ro 0 0 username=guest,password=""
should be: //computer/share /directory smbfs ro,username=guest,password="" 0 0 |
thanks I alway get stuck on syntax thanks again
|
what is the significance of the ro after smbfs?
|
ro = read only
|
rw = read write
|
All times are GMT -5. The time now is 10:04 PM. |