• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

how to remount smb after everytime i reboot

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

firebird79

Member
Joined
Mar 24, 2002
i used to mount a file from other machine, but i get fed up about remount the file after i reboot my machine. is there any way to do it like lunching automatically at start up.
 
OP
F

firebird79

Member
Joined
Mar 24, 2002
eh....how to edit? just put the command that i type when i want to smbmount the file??? i still new in linux, thanks
 

PolyPill

Senior Member
Joined
May 20, 2001
Location
Germany
add something like this:

//SERVER/Share /localpath smbfs defaults,user,auto,username=you,password=blah 0 0

You should add an entry in fstab for every drive you access often. If you don't want it to mount at boot replace auto with noauto
 
OP
F

firebird79

Member
Joined
Mar 24, 2002
maybe i'm stupid, but i add the thing and it still don't work. the server is an win2k pc. i used to mount the file like this:
smbmount \\\\server\\share /home/user/share -o username=blah, password=blah.
this command work great for me. but i was tired up with typing this thing over and over again. is this should be like to add in fstab:
//server/share /home/user/share smbfs defaults,user,auto,username=blah,password=blah 0 0

thanks.......
 

turnip_01

Registered
Joined
Apr 1, 2002
You can make a shell script to mount them.
If you are using redhat or some other distro that uses rc directories do this

cd /etc/init.d
vi netmnt

<push I>
#!/bin/sh
mount -t smbfs -o username=user,password=password //netbiosname/sharename /mountpoint

<hit escape>
<hit shift colon>
<hit wq, push enter>
chmod 744 netmnt
cd /etc/rc3.d
ln /etc/rc3.d/netmnet S50netmnt

reboot and you should be done
hope this helps
 
Last edited:
OP
F

firebird79

Member
Joined
Mar 24, 2002
hi turnip_01, i follow ur step till chmod the file name netmnt, then i get confuse. i assume u said i had to make another file name S50netmnt in /etc/rc3.d with the contain same as the file that i make in /etc/init.d, am i right? but i found out that i had another file name S50xinetd. is that okey to said you said? sorry for bothering you again.
 

turnip_01

Registered
Joined
Apr 1, 2002
If you use the ln command it will make it for you , it stands for link

so yeah just cd into rc3.d and ln.....
and all will be well.