Results 1 to 5 of 5

Thread: Create a MAP NETWORK DRIVE on TumbleWeed

  1. #1

    Default Create a MAP NETWORK DRIVE on TumbleWeed

    I have been using this guide on Ubuntu for years
    https://ubuntuhandbook.org/index.php...-ubuntu-14-04/

    I want to Map a network drive under the Media folder.

    can anyone help me with this on OpenSuse Tumbleweed.

  2. #2
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,127

    Default Re: Create a MAP NETWORK DRIVE on TumbleWeed

    There are more than one way to do this but I prefer systemd method;

    Create a file called /etc/systemd/system/media.myfolder.mount

    Code:
    [Unit]
    Description=Cool description of my mounted share
    
    
    [Mount]
    What=//IP.OR.HOSTNAME.OF.SHARE/SHARENAME
    Where=/media/myfolder
    Options=user=USERNAME,password=PASSWORD,gid=USERS,uid=MYLINUXUSERNAME,vers=3.0,_netdev,file_mode=0664,dir_mode=0775
    Type=cifs
    TimeoutSec=15
    
    
    [Install]
    WantedBy=multi-user.target
    To explain things;
    - What -> Is where the mount lives, for example //windowspc/share
    - Where -> Where you want to mount it, note that in systemd the mount file has to be named like the folder ( for example if you mount it to /nas/coolfolder, the systemd .mount has to be named nas.coolfolder.mount )
    - Options -> replace USERNAME and PASSWORD with the required user/pass to access the mount. UID = your Linux username

    Once you have adjusted everything, you can simply issue; systemctl daemon-reload followed by systemctl start your.cool.mount

    An even neater trick is that systemd can automount the folder when you enter it, if you create a filed in /etc/systemd/system/media.myfolder.automount with the contents:

    Code:
    [Unit]
    Description=Some cool description
    
    
    [Automount]
    Where=/media/myfolder
    
    
    [Install]
    WantedBy=multi-user.target
    This may sound very complex but once you get the hang of it, it becomes incredibly useful.
    .: miuku #suse @ irc.freenode.net

  3. #3

    Default Re: Create a MAP NETWORK DRIVE on TumbleWeed

    @Miuku

    Thank you for the reply.

    I am more of a copy paste linux user.

    Your first instruction was to create a file
    How do I go about it ?

    sudo gedit /etc...
    sudo zypper gedit /etc...

    Thanks

    JD

  4. #4

    Default Re: Create a MAP NETWORK DRIVE on TumbleWeed

    The following steps, I was able to do in a superuser terminal:
    I created a Folder in Media
    [HTML]sudo mkdir /Media/HPS [HTML]

    and ran the following
    HTML Code:
    gedit /etc/systemd/system/media.HPS.automount
    And I added the following in the file and saved:
    HTML Code:
    [Unit]
    Description=HerculeServer
    
    [Mount]
    What=smb://192.168.1.104/HPS
    Where=/Media/HPS
    Options=user=admin,password=xxxx,gid=USERS,uid=abc,vers=3.0,_netdev,file_mode=0664,dir_mode=0775
    Type=cifs
    TimeoutSec=15
    
    
    [Install]
    WantedBy=multi-user.target
    And I ran the following
    HTML Code:
    systemctl daemon-reload
    and
    HTML Code:
    systemctl start media.HPS.mount

    And I have restarted.
    What am I doing wrong.

  5. #5
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    297

    Default Re: Create a MAP NETWORK DRIVE on TumbleWeed

    Quote Originally Posted by herculepirate View Post
    The following steps, I was able to do in a superuser terminal:
    (...)
    HTML Code:
    gedit /etc/systemd/system/media.HPS.automount
    (...)
    HTML Code:
    systemctl start media.HPS.mount
    What am I doing wrong.
    If these are the exact names you have used probably
    Code:
    systemctl start media.HPS.automount
    is more suitable.

Posting Permissions

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