Mount network folders on boot-up (Ubuntu 6.06)


Recommended Posts

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

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.

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

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?

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.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • PowerToys is getting a new window management utility by Taras Buria If you use PowerToys on Windows 11 or 10, you probably know that the app has quite a few utilities for window management. Fancy Zones, Always on Top, Crop and Lock, just to name a few. Soon, Microsoft will add another one, and fans of Alt + Tab should be excited. Proposed by Clint Rutkas, the module has a very simple idea: use a keyboard shortcut to toggle between windows within one app. For example, if you have four browser windows open, Alt + ` will let you switch between them just like Alt + Tab switches between all running apps. Here is the utility description from its GitHub pull request: Like other PowerToys utilities, Alt Window Cycle will offer shortcut customization. You will be able to use default shortcuts (Alt + ` for the next window or Alt + Shift + ` for the previous one) or remap them to something else. For now, there is no information on when Alt Window Cycle will arrive, so we will have to wait for the next PowerToys feature update (Microsoft usually pushes them on a monthly basis). Recently, Microsoft released version 0.100, which reworked the shortcuts guide, introduced an extension gallery for Command Palette, and more. Shortly after, version 0.100.1 arrived as a bug-fixing update. PowerToys is available on Windows 10 and 11, and you can get the app from the official GitHub repository, the Microsoft Store, or winget. Although Windows 10 is no longer supported, PowerToys developers currently do not plan to drop the now-unsupported operating system. And with Microsoft giving Windows 10 one more year in the Extended Security Update, you can expect PowerToys to remain available on Windows 10 for quite a while.
    • This is sadly what happens when a company tries to become political and focus on agendas outside gaming, the constant push of inclusivity and whatever the current thing was and box ticking, instead of simply focusing on what was a great game to many myself included, massive let down that a once great game company has ended up this way hopefully this will be a lesson to game devs from here on in to leave politics and agendas out of gaming
    • Prices for consumer electronic stink and will continue to stink for quite some time. If you're at all hesitant, just buy now because it's not getting better. (or buy used and save even more cash)
  • Recent Achievements

    • First Post
      kinowa earned a badge
      First Post
    • Rookie
      krychek57 went up a rank
      Rookie
    • Grand Master
      Jaybonaut went up a rank
      Grand Master
    • One Year In
      Philsl earned a badge
      One Year In
    • Dedicated
      Scoobystu earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      409
    2. 2
      +Edouard
      168
    3. 3
      PsYcHoKiLLa
      132
    4. 4
      Xenon
      73
    5. 5
      Michael Scrip
      73
  • Tell a friend

    Love Neowin? Tell a friend!