Mounting a Samba share after booting
Right - nice and easy one for you!!!
I have a small home network consisting of a Linux (Mandrake 9.1 with KDE GUI) NAT/Gateway, and some Win98se boxes. I use Samba to host the shared directory. Thing is, I have to boot the windows machines *before* I boot the Linux machine, otherwise I cannot access the shared directories on the windows machines from the Linux box. I've tried mounting them using DiskDrake and manually at the console, all to no avail. Does anyone know how to access the shared directories on the windows boxes if I mistakenly boot the Linux box up first? Thanks for your help in advance!!!! Regards, Matt :newbie: |
well there's no easy way to do that, Samba has no special option to keep retrying. I guess you'll have to write a little Bash script to look at it and to run this script each 5 min with cron.
|
Thanks for your reply, half_elf!
I don't necessarily need to automate, just to be able to run a script/type a command that I can run when someone boots up another PC. :cry: Has anyone else hit this problem or have I misconfigured or something? |
This is a normal behavior.
In Linux, you NEED to mount disks to use them, even if the "disk" is a network share. You'll need to write a script like the following then to run it at fixed time with cron. #!/bin/sh HDOK=`df | grep "windoze_computer_name"` if [ HDOK = "" ]; then BOXOK=`ping -c windoze_computer_ip` if [ BOXOK != "destination unreachable" ]; then smbmount //windoze_computer_name/shared_dir fi fi ok this script is a bit stupid, and I haven't tried it, but it give you a general idea. |
That's cool, thanks. I'll give that a go!
|
All times are GMT -5. The time now is 07:25 PM. |