Results 1 to 5 of 5

Thread: How do you mount a network folder on startup?

  1. #1
    Join Date
    Feb 2008
    Beans
    7

    How do you mount a network folder on startup?

    Hi all,

    I'm running Ubuntu 7.10 as a guest OS in VirtualBox. I am using Vista as a host. I have managed to set up the network connections so I can access my Windows shared folder in Ubuntu, but I have to manually connect every time I run the OS. Is it possible to mount the folder so I can access it straight away?
    I want to use Amarok for my music and F-Spot, but it won't let me access Network folders.

  2. #2
    Join Date
    Nov 2006
    Location
    Norway
    Beans
    795
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: How do you mount a network folder on startup?

    Use /etc/fstab

    add a line for the share, have a look at this http://ubuntuforums.org/showthread.php?t=283131

    This is the interesting part:
    Code:
    cifs still uses a credentials file to avoid the need to enter a password. If you do not use a credentials file, you will mount a samba share with sudo and enter your username and password in a terminal.
    
    Quote://Server/share /mnt/samba cifs users,auto,credentials=/path/credentials_file,noexec 0 0 
    
    Server = Name (if in /etc/hosts) or IP Address of samba server.
    share = Name of shared directory (folder).
    /mnt/samba = your desired mount point.
    /path/credentials_file = full path to your credentials file. A credentials file should be owned by root (permissions 400) and contain two lines :
    
    username = samba_user
    password = samba_user_password 
    
    samba_user = samba user (on server).
    samba_user_password = samba user password (on server).
    noexec for security (it can be bypassed ...).
    
    smbfs : depreciated, but similar.
    
    Quote://win_box/shared_folder /mnt/samba smbfs rw,credentials=/home/user_name/winbox-credentials.txt 0 0
    the option 'auto' makes it mount at boot (at least it works for me)
    Open mind, open source!
    Keep control of computer usage with timekpr
    Screensaver for Amarok? AmarokScreenSaver
    My (Norwegian) blog about motorcycles and MotoGP

  3. #3
    Join Date
    Jun 2008
    Beans
    6

    Re: How do you mount a network folder on startup?

    Running 8.0b with VirtualBox 1.62 and XP Pro.

    I've set Desktop as shared folder,but can't seem to mount it.

    I tried your tip but get this:

    root@bill-laptop:/home/bill# /etc/fstab
    bash: /etc/fstab: Permission denied

  4. #4
    Join Date
    Nov 2006
    Location
    Norway
    Beans
    795
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: How do you mount a network folder on startup?

    You need to edit that file as root

    Code:
    sudo nano /etc/fstab
    then type your password
    Open mind, open source!
    Keep control of computer usage with timekpr
    Screensaver for Amarok? AmarokScreenSaver
    My (Norwegian) blog about motorcycles and MotoGP

  5. #5
    Join Date
    Mar 2008
    Location
    Oregon
    Beans
    252
    Distro
    Ubuntu Karmic Koala (testing)

    Talking Re: How do you mount a network folder on startup?

    I think the last reply missed that you were in root already, therefore the sudo will not help, but what will is that you need to type the following:

    "nano /etc/fstab" (you forgot the nano)

    What you had typed was actually trying to execute the file, which is not an executable (by default at least)

    Hope this helps

    -Cybie

    PS--> BE SURE to backup the fstab file before editing it. IE: cp fstab fstab.bak

    Quote Originally Posted by billcondie View Post
    Running 8.0b with VirtualBox 1.62 and XP Pro.

    I've set Desktop as shared folder,but can't seem to mount it.

    I tried your tip but get this:

    root@bill-laptop:/home/bill# /etc/fstab
    bash: /etc/fstab: Permission denied
    Last edited by Cybie257; June 13th, 2008 at 09:14 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •