LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mount Network share on boot (https://www.linuxquestions.org/questions/linux-newbie-8/mount-network-share-on-boot-760159/)

CapnStank 10-06-2009 04:09 PM

Mount Network share on boot
 
Hi Everyone,

I'm running Fedora 11 and need to have a cifs share mount on boot. What do I need to do?

I can mount the drive through command line by typing
Code:

mount.cifs //192.168.1.249/xserve/shared /home/sasktel/mnt -o username="guest"
What do I need to edit to allow this to mount on boot?

I've used Fedora for a little while now but my workplace has asked that I develop a BitTorrent tracker service to demonstrate how it works to a few departments in our company and I'll be diving into a bit more in depth things. If ya got any questions for me just ask!

-Capn

tobias_r33per 10-06-2009 04:23 PM

login as root:

Quote:

su
modify "vim /root/.smbcredentials"

Add the following lines (change winusername and winpassword to the correct username and password for the samba/windows server you want to connect to):

Quote:

username=winusername
password=winpassword
SAVE THE FILES:

Quote:

chmod 700 /root/.smbcredentials
modify the "vim /etc/fstab" to include your share

insert share name and server where appropriate


Code:

//192.168.1.249/xserve/share /home/sasktel/mnt cifs  credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 1

CapnStank 10-06-2009 05:03 PM

I've added what you posted above but get a blank /home/sasktel/mnt folder. Here's my /etc/fstab
Code:

#
# /etc/fstab
# Created by anaconda on Mon Oct  5 15:30:28 2009
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or vol_id(8) for more info
#
UUID=6e50cf4c-132e-4b66-bd33-849a04fe902a        /boot                  ext3    defaults                                1 2
/dev/mapper/vg_tracker-lv_root                        /                      ext4    defaults                                1 1
/dev/mapper/vg_tracker-lv_swap                        swap                    swap    defaults                                0 0
tmpfs                                          /dev/shm                tmpfs  defaults                                0 0
devpts                                          /dev/pts                devpts  defaults                                0 0
sysfs                                          /sys                    sysfs  defaults                                0 0
proc                                            /proc                  proc    defaults                                0 0
//192.168.1.249/xserve/share                        /home/sasktel/mnt        cifs          credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 1

And the .smbcredentials file:
Code:

username="guest"
password=""

This is where I assume I've messed up. Should I remove the quotes? If so, what do I need to replace password with to imply that no password is set?

tobias_r33per 10-06-2009 07:19 PM

try this instead:

modify /etc/fstab to use this instead to see if this works better

Quote:

//192.168.1.249/xserve/share /home/sasktel/mnt cifs username=guest,iocharset=utf8,file_mode=0777,dir_mode=0777 0 1


All times are GMT -5. The time now is 09:42 AM.