Tristan Posted July 1, 2006 Share Posted July 1, 2006 I'm trying to mount network folders on boot-up, and allow all users to read/write but nothing happens, when I go to the directory where I mounted it, nothing is there. By the way, I'm trying to mount folders from a XP PRO SP2 machine that doesn't have a password. When I mount the network folders manually using sudo mount //192.168.1.102/Videos /media/Justin/Videos -o dmask=777,fmask=777 it works fine. Can anyone help? Here is my fstab. # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 /dev/hda6 / ext3 defaults,errors=remount-ro 0 1 /dev/hda1 /media/hda1 ntfs nls=utf8,umask=0222 0 0 /dev/hda5 /media/hda5 ntfs nls=utf8,umask=0222 0 0 /dev/hda8 /media/hda8 vfat iocharset=utf8,umask=000 0 0 /dev/hdb1 /media/hdb1 ntfs nls=utf8,umask=0222 0 0 /dev/hda7 none swap sw 0 0 /dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0 /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0 //192.168.1.102/Downloads /media/Justin/Downloads smbfs dmask=777,fmask=777 0 0 //192.168.1.102/SharedDocs /media/Justin/SharedDocs smbfs dmask=777,fmask=777 0 0 //192.168.1.102/Videos /media/Justin/Videos smbfs dmask=777,fmask=777 0 0 Link to comment Share on other sites More sharing options...
Tek Posted July 2, 2006 Share Posted July 2, 2006 I'm not sure about SMB. If i was doing it, I would add the following commands into Ubuntu's equivalent of /etc/rc.local, whatever it might be called. mount //192.168.1.102/Videos /media/Justin/Videos -o dmask=777,fmask=777 mount //192.168.1.102/SharedDocs /media/Justin/SharedDocs -o dmask=777,fmask=777 mount //192.168.1.102/Downloads /media/Justin/Downloads -o dmask=777,fmask=777 Automounting filesystems is usually one of the first things that happens at boot time, networking support and other network related things usually come later. Maybe you can change the order your services start at boot time. Link to comment Share on other sites More sharing options...
Tristan Posted July 3, 2006 Author Share Posted July 3, 2006 didnt work Link to comment Share on other sites More sharing options...
Tek Posted July 3, 2006 Share Posted July 3, 2006 Enlighten me, what is Ubuntu's equivalent of /etc/rc.local ? Link to comment Share on other sites More sharing options...
Tristan Posted July 3, 2006 Author Share Posted July 3, 2006 this is how my /etc/rc.local looks like. I removed the exit 0 at the end and put in the mounts. #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. mount //192.168.1.102/Videos /media/Justin/Videos -o dmask=777,fmask=777 mount //192.168.1.102/SharedDocs /media/Justin/SharedDocs -o dmask=777,fmask=777 mount //192.168.1.102/Downloads /media/Justin/Downloads -o dmask=777,fmask=777 Link to comment Share on other sites More sharing options...
Tek Posted July 3, 2006 Share Posted July 3, 2006 Is the script executable? ls -l /etc/rc.local Link to comment Share on other sites More sharing options...
Tristan Posted July 3, 2006 Author Share Posted July 3, 2006 Is the script executable? ls -l /etc/rc.local it says "In order to enable or disable this script just change the execution bits." is editing it changing the execution bits?.....sry im just a newbie Link to comment Share on other sites More sharing options...
Tek Posted July 3, 2006 Share Posted July 3, 2006 No, changing the executable bits would be: chmod +x /etc/rc.local Link to comment Share on other sites More sharing options...
Tristan Posted July 3, 2006 Author Share Posted July 3, 2006 No, changing the executable bits would be: chmod +x /etc/rc.local I typed that in and rebooted but nothing still. Link to comment Share on other sites More sharing options...
Tek Posted July 3, 2006 Share Posted July 3, 2006 Put the 'exit 0' back at the end. Link to comment Share on other sites More sharing options...
Tristan Posted July 3, 2006 Author Share Posted July 3, 2006 ok, its still doesn't mounting when I boot up, but when I type sudo /etc/rc.local in the terminal it asks from my password then again 3 more times. When I finish typing in the passwords the shared folders finally mounts and I'm able to access them. I guessing the only reason it doesn't work when I boot up is because it doesn't have my password or whatever, is there anyone to put that in? Link to comment Share on other sites More sharing options...
Tek Posted July 3, 2006 Share Posted July 3, 2006 That script would be run with root privileges at boot, so you shouldn't need to worry about a password. I just read ubuntuforums.org, and this apparently works in fstab: //192.168.1.102/Videos /media/Justin/Videos smbfs guest,uid=<username>,iocharset=utf8,codepage=unicode,unicode,auto 0 0 //192.168.1.102/SharedDocs /media/Justin/SharedDocs smbfs guest,uid=<username>,iocharset=utf8,codepage=unicode,unicode,auto 0 0 //192.168.1.102/Downloads /media/Justin/Downloads smbfs guest,uid=<username>,iocharset=utf8,codepage=unicode,unicode,auto 0 0 Obviously replace <username> with an actual name, and ignore the line wrapping. Link to comment Share on other sites More sharing options...
Tristan Posted July 3, 2006 Author Share Posted July 3, 2006 yeah I was just there also, I just had to put cifs instead of smbfs in the fstab, now everything is working perfectly. thanks. //192.168.1.102/Videos /media/Justin/Videos cifs uid=1000,umask=777 0 0 Link to comment Share on other sites More sharing options...
Recommended Posts