Linux & Co.

Integrate network shares permanently in Linux

If you deal with networks under Linux, you cannot avoid sharing. We show how you can integrate them permanently.

Network shares from the NAS, computer or a USB disk on the router can be easily reached, opened and mounted under Linux via the file manager - but they are gone again after the next system start. The solution may seem ugly to anyone used to Windows, but it's terribly simple: a small entry in a text file. For our example, a virtual Ubuntu with LXDE desktop is used and a folder with series from the QNAP NAS is to be integrated. Of course, the whole thing works exactly the same way with a folder that has been released under Windows via the context menu.

Addendum: In the meantime, May 2019, permanent integration also works via many file managers, for example under Ubuntu with Gnome desktop. We'll show you how here. But be careful: You have fewer options there than with fstab, of course ;). So actually none...

1. Create mount point

The release is included in a folder, so it creates the "Series" folder in the user folder, for example. By default, the /mnt and /media directories are chosen (for example, Ubuntu automatically creates a desktop icon for folders in /media).

2. Link folders

Open a terminal and give the command

sudo gedit /etc/fstab

to open the "fstab" file with the text editor "gedit" - alternatively you can of course also use nano, vi, emacs or any other editor. Enter a line like this at the end of the file:

// /home/benutzername/Serien cifs defaults,username=deinname,password=deinpasswort

The first path specifies the NAS folder, the second the mount point folder just created, cifs stands for Common Internet File System and sets the protocol, defaults sets the standard settings for cifs and the login data are self-explanatory Login data can also be swapped out and addressed with "credentials=/path/to/smbcredentials 0 0", whereby the "smbcredentials" file only has to contain two lines with "username=yourname" and "password=yourpassword". Part of the defaults setting is also the automatic mounting of the folder at the next start.

Folder pairs are simply stored in the fstab file.

UPDATE: If you write access to the network folders for normal users (i.e. without root), you can explicitly specify the desired user:

// /home/benutzername/Serien cifs defaults,uid=1000,username=deinname,password=deinpasswort

The uid=1000 give the ID of the local user who should have write access. That has nothing to do with that username of the user on the remote computer! You can find the ID of the user via id -a username out of here. Instead of uid you can too gid use for groups.

3. Integrate network shares immediately

A restart is not necessary at all

sudo mount -a

it is enough to read in the fstab again and the release ends up in the mount point and, depending on the system, also on the desktop or in the navigation bar of the file manager.

The serial release will always be in place from now on.

Mirco Lang

Freelance journalist, Sauerland exile, (fairly old) skateboarder, graduate computer scientist, retail salesman, open source nerd, Checkmk handbook writer. Ex-Saturn'ler, Ex-Data-Becker'ler, Ex-BSI'ler. First contact with computers: ca. 1982 - a friend's big brother's C64. If you want to read more about open source, Linux and craft stuff and support Tutonaut here: About Coffee sponsorship via Paypal.I'm always happy. In advance: Thank you! Do not miss: and New: Mastodon


  1. Hallo,
    I have a strange problem: While after starting up a Raspberry (with the
    Raspbian Buster operating system) Shares can be displayed using the df command,
    will these not work on another Raspberry running Raspbian Bullseye (Raspberry
    Pi OS) has been installed. Only after active use of these shares, such as
    with ls, touch etc., are they then visible or are they also displayed with df...

    It's not the end of the world for me, but I don't want an ugly one either
    Apply workaround, for example during the boot process by scripting this
    Shares can be made visible with the above commands.

    maybe does anyone know of advice or the necessary supplement or possibly has to be completely different
    to be appointed.

    Entries from fstab, Raspbian Bullseye:
    //Hirsebrandt/HirseShare/Movie1/AuxHD2/auxHD-DL /home/pi/fbnas-auxhd2/auxdl cifs vers=3.0,nounix,noserverino,uid=1000,gid=1000,dir_mode=0750,file_mode=0640,credentials=/root/.credi/fbnas-auxdl2.cred,x-systemd.automount, 0 0

    //ErazerP10/share /home/pi/share-erazerp10 cifs vers=3.0,nounix,noserverino,uid=1000,gid=1000,dir_mode=0750,file_mode=0640,credentials=/root/.credi/erazerp10-share. cred,x-systemd.automount, 0 0

    //RaspMediaP/share /home/pi/share-raspmediap cifs vers=3.0,defaults,noauto,nofail,uid=1000,gid=1000,dir_mode=0750,file_mode=0640,credentials=/root/.credi/raspmediap- share.cred,x-systemd.automount, 0 0

    For completeness, Raspbian Buster:
    //Hirsebrandt/HirseShare/Movie1/AuxHD/auxHD-DL /home/pi/fbnas-auxhd/auxdl cifs vers=3.0,nounix,noserverino,uid=1000,gid=1000,dir_mode=0750 ,file_mode=0640,credentials= /root/.credo/fbnas-auxdl.cred,x-systemd.automount, 0 0

    //ErazerP10/share /home/pi/share-erazerp10 cifs vers=3.0,nounix,noserverino,uid=1000,gid=1000,dir_mode=0750 ,file_mode=0640,credentials=/root/.credo/erazerp10-share. cred,x-systemd.automount, 0 0

    //RaspMediaP2/share /home/pi/share-raspmediap2 cifs vers=3.0,defaults,noauto,nofail,uid=1000,gid=1000,dir_mode= 0750,file_mode=0640,credentials=/root/.credo/raspmediap2- share.cred,x-systemd.automount, 0 0

    Oh yes, one more comment: A subsequent mount -a has a similar effect
    as with the ls or touch commands, but the RaspMediaP share remains "invisible" when using df -h.

    Greeting Christian

  2. Hi Mirco,
    I have integrated a WD NAS (as a pure data grab) via fstab on my Ubuntu server and would like to back up files (Plex videos) via rsync.
    // /mnt/nashd1 cifs uid=1000,gid=1000,rw,user,credentials=/home/adminmk/.smbcredentials 0 0
    Unfortunately I get the error message Permission denied (13) for the mounted target drive during rsync.
    Rights, rights, rights, but I don't know how to solve this.
    can you support me

    1. Check out the rights:

      getfacl /mnt/nashd1

      Presumably only the owner has write permissions here? And the rsync command is someone else running it? If so, you could change the group, give it write permissions, and add the affected user to that group, let's say user "mrSkript":

      sudo addroup gruppe1
      sudo chgrp gruppe1 /mnt/nashd1
      sudo chmod g+x /mnt/nashd1
      sudo adduser mrskript gruppe1

      Of course it's only one of many variants, but it seems to work here - at least I would guess the wrong user. Alternatives: change owner (chown), create new user.

  3. Hello Mr Lang,
    UBUNTU 20.04 + Linux Mint 20 + Fritzbox 7590
    Unfortunately, the integration no longer works for me since the software update. With the update, AVM switched to smb 3.0.
    First of all, it is possible with AVM to switch back to 1.0 - works. unfortunately not. Connection to NAS yes, but all documents are only opened as read-only.
    If I stay with smb 3.0, you can add – vers=3.0, noserverino – to the fstab. But even then, only read-only opens.
    Next variant: No samba&cifs-utils, .smbcredentials
    Instead, open the NAS with smb://fritz.nas/ – save the username and password and set a bookmark. Works better but not right. Documents, etc. are opened normally, but saving causes problems. If a document is accidentally saved whose name already exists, it will be replaced without asking. Something like this rarely happens, but correcting it again with a backup, provided I notice it in time, is not the last word.
    Do you have a solution for smb 3.0, or do I have to live with it Fritzbox/Linux don't like each other, keep your eyes open when buying hardware.
    MfG Harald

    1. Hello Mr. Lang, hello Harald,
      had similar problem and tested and searched for days. Now everything is ok again!
      My environment:
      FRITZ!Box 7490, FRITZ!OS 07.21, Ubuntu 18.04, Linux Mint 19.03
      Current configuration:
      Support for SMBv1 is NOT activated in FRITZ!Box
      In fstab parameter vers=1.0 gone, parameter noserverino instead
      In /etc/samba/smb.conf under Global Settings is now:
      client min protocol = SMB2
      client max protocol = SMB3
      Important notices were in a DAK Bungalow.
      Best regards

      1. Hello Axel,
        thank you for your reply.
        Will play again on the weekend hoping that it will work for me.
        However, there is a deviation, my AVM 7590 has the software version 7.20 installed, according to the update attempt, the current version. Variant. Is your 7.21 a lab version?

        Best regards

      2. Hello Harald,
        I updated my FRITZ!Box "normally", i.e. not a laboratory version. Addendum: After installing the solution on other machines, I noticed that the changes in smb.conf are not always necessary.
        Kind regards, Axel

      3. Hello Mr. Liedtke,
        Sorry, different AVM devices just have different software versions, I could have found it myself.

        I have now followed your instructions, unfortunately without success.
        My way:
        sudo apt install cifs-util samba
        sudo mkdir -vp /media/NAS
        gedit >.smbcredentials
        password=my/your password
        sudo gedit / etc / fstab
        There at the end the following line:
        //IP-DER-FRITZBOX/fritz.nas/ /media/NAS cifs credentials=/home/USERNAME/.smbcredentials,noseverino,uid=1000,gid=1000 00
        /etc/samba/smb.conf under Global Settings:
        client min protocol = SMB2
        client max protocol = SMB3

        NAS is mounted at system startup. Existing files are opened - but very slowly!
        New documents (.odt) are saved without any problems – but an odt with one word content: test
        When opened, becomes a 36-page document filled with #######…….
        So for me still no way UBUNTU/FB 7590/NAS
        In the meantime I have switched the desktop + 1 folding computer to M$, NAS is running perfectly.
        Will probably also switch the 2nd folding computer to W10. After well over ten years, I have to admit that both Debian and Red Hats overwhelm me. Above all, nothing has gotten better/easier in over a decade. With each new version, the difficulties increased and the LINUX support from hardware manufacturers dwindled steadily.

        Greetings Harald

      4. Hello Mr Harald,
        I'm sorry it's not working for you. with me sees
        the environment looks very similar, I only see 2 differences.
        (1) There are more parameters in my fstab. In one line is
        each separated by a TAB:
        //ip addr /media/NAS cifs defaults,nounix,guest,
        iocharset=utf8,sec=ntlmssp,noserverino 0 0
        (2) I don't use the ftpuser, I have it in the FRITZ!Box
        defined a user with a password. If you
        ftpuser also has a password, that should actually be the case
        go well.
        I agree with you that a lot has changed in the last 10 years
        has changed. Some things have become more complex, but others have also become simpler.
        I think nowadays you have to search the internet much longer before you finally find it
        access the desired information.
        Kind regards, Axel

      5. Hi,

        everything done like that.
        Not working, Error= No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later….., keep praying.
        4 hours away, no result, typical for Linux.
        Now 3 days of frustration reduction, then everything again, system routine
        It used to work before the update.

    2. Hello Harald
      I have the same problem and I'm almost desperate.
      Tried everything possible in the fstab, but always only access without write rights.
      There is then an indication of obsolete file handles.

      Greetings Gerhard

      1. Hello Gerhard,
        I haven't figured out what I'm doing wrong for a long time now. I think the problem is the Fritzbox. I had borrowed a Netgear router, my way worked there without any problems. That's why it was a simple calculation for me: One almost new router + repeater + 2 x telephones - costs Microsoft.
        I don't like Windows either and I don't know how much they snoop. But at least it works. But I can't judge whether "LINUX" is really the more honest system, or whether it only lives on from a legend.
        At some point I'll try my luck again with the one folding calculator, but don't hurry, it's in the drawer.
        I'm a mechanical engineer/pensioner, intuition/making sense, that's all I can do.
        I see calculators as tools, not toys. The relationship between system maintenance and work has not been right for a long time. The Linux distributions have failed. It doesn't matter to me whether it failed because of the inability of the makers, the users, or because of the lobbying power of MS/Apple. I have many interests, so just one more try. If he fails too, a few € for a third W10 license and that's it. Incidentally, W10 also has many advantages: update bicycle navigation system, backup mobile phone, network printer/multifunction device installed in a few seconds, SoftmakerOffice also runs much better under Windows, etc.
        Of course I wish you every success, only if so – for how long? Next UBUNTU version, next but one software update for the Fritzbox?

        Greetings Harald

      2. Hello Axel, Hello Gerhard,
        After the FB 7590 has now also received the 7.21 update, I played again today with UBUNTU 20.04.
        First attempt my old way - but vers.=1.0 replaced by 2.0, I had found a solution on the net. Integration at system start problem-free. LibreOffice odt as usual – after saving on NAS, the one word test becomes a 43-page document filled with #######
        Second attempt: Your way, with my data, copied.
        Integration here without any problems. LibreOffice, however, with the same result.
        That's it. I finally give up and buy the second folding computer a W10 as well.
        I know about my shortcomings, but I'm sure I'll be able to copy a solution. Therefore I have already doubts whether these solutions with FB 7590; UBUNTU 20.04/LinuxMint 20 and update 7.20/7.21 really work. Even the checkmark for smb 1.0 activate doesn't bring any useful results for me.
        It also surprises me - all the people who really have a clue, who are otherwise quick to help with tutorials - radio silence.
        This reinforces my suspicion that FB/smb 3.0 and DEBIANS no longer fit. As already written, with a Netgear router 3.0 worked for me without any problems and right away.
        Happy Sunday everyone.
        Greetings Harald

  4. I
    Unfortunately I can't get it baked with fstab. I have a USB disk on the Usb3 port on my router which runs with ddwrt. On Nas, it's public, meaning it's available to anyone on the network without a password or user input. With Linux (Xubuntu|) I can mount it with the command "sudo mount -t cifs -o vers=2.0 //……./share /media/net". The window will then appear... Password for root@//…. Since it runs as public without a password, I only confirm it with an input and it is mounted. Unfortunately I can't get it to work in fstab. When I insert the line in fstab
    // cifs defaults
    With mount -a I get the prompt ….Password for root@//, but after Enter I get mount error(2):No such file or directory.
    Anyone know advice? Thanks in advance

    1. now i finally made it. In my fstab entry, I had spaces after the commas, which I removed and then it suddenly worked. But now the problem when starting was that my network wasn't ready yet due to wifi and it wasn't mounted when I started. With the systemd network-online.targeted option, it also works, but now it takes forever to shut down because it's trying to release the share, which is no longer accessible due to the cut wifi.
      The following is my fstab entry
      // /media/net cifs uid=1000,gid=1000,x-systemd.automount,,defaults,vers=2.0,username=linux, password=linux

      If I run sudo umount /media/net in the terminal before shutting down, it usually doesn't unmount the share for me. I do not know why. The shutdown now takes forever

  5. It basically fits. Unfortunately I cannot access the folders, the operation can only be performed by the root user. Entering the ID didn't help at all.
    The network drives could allegedly also be permanently integrated directly via the GUI. Not true at all with my Ubuntu. After a restart, all have disappeared again and must be integrated again. The great thing about it is that the password for the network drives also has to be re-entered again and again, although the input is explicitly saved.
    Is it possible that Ubuntu 19.10 just runs badly?

    1. Embedding via the GUI is actually something quite strange - it feels like this "never forget" doesn't really always work... I never pursued it further either, because the fstab way has always worked for me. I have no idea why this doesn't work for you, if the UID and password are correct, I would next tap on the write permissions for the mount folder. Perhaps "chmod 777 /my/mountpoint" will help if the directory is outside of the user's home folder, for example. Sometimes from the stomach.

  6. Hello Mirco,

    Thank you for the interesting and helpful post!

    I have one more question, after the NAS was integrated via fstab, I noticed that the speed dropped rapidly to 2-3MB/s (network 1000 MBit/s) during copy processes.

    In comparison, if I integrate the smb release via Nautilus (gvfs), for example, the speed for copy processes is 30-40MB/s. With gvfs I'm 10 times faster...

    I have the problem when copying within the NAS, for example when I copy/move a video file (3GB) from one folder to another folder.

    Do you have a tip ahead that could be? smb/cifs and gvfs should have similar performance, right?

    The fstab entry is handy, would like to keep it that way if the problem can be fixed...

  7. Hallo,

    I have now done everything as described. I also see files in the folder that I created, for example, in the previously working Windows mount.
    But I can't change or even delete the files.
    I would like to use the access to the NAS for a data backup.

    curious greetings,

  8. Moin, I'm just desperate on how to get the cow off the ice.
    Given is a WDmycloud. However, with the 04..... firmware.
    I want to include them in LinuxMint 18.1
    smb per nemo works, but not nfs. smb caves slowly.
    Ergo, integrate via nfs in the hope of speed.
    However, nfs refuses mount access due to insufficient rights.
    However, I did not find a way to transfer user and password.

    I went via etc/autofs and then wanted to mount it with a click.
    other nas löppt there perfectly.

  9. Hello Mirco,
    had a little over a year ago from Win 10 to Unity 16.04. xy switched.
    I integrated the network disk as follows:
    sudo apt install cifs-utils
    sudo mkdir -vp /media/NAS
    sudo gedit
    .smbcredentials created with:
    password=My password
    and saved.
    sudo gedit / etc / fstab
    then as the last line:
    //IP-DER-FRITZBOX/fritz.nas/ /media/NAS cifs credentials=/home/harald/.smbcredentials,uid=1000,gid=1000 0 0
    a blank line after and saved.
    Restart and NAS was there, bookmarks for the network disk and for the Documents_NAS folder.
    This ran smoothly on the folding computer with Unity; on desktop with removable disks under Unity, Gnome, Mint, Mate, Mint Mate, not under Gnome/Unity 17.10 and Mate 17.10.
    Everything almost perfect – until last Thursday. Now comes the hint for all derivatives:
    "NAS" cannot be accessed
    mount: only root can mount // on /home/harald/NAS
    Since nothing has changed, an update is probably the cause.
    I came across your site while searching.
    If you can think of anything, I'd be grateful.
    Sincerely, Harold

    1. Hmm, I'm not so sure about that, but I would guess samba updates. Here at askubuntu is there anything on the subject. The "solution" here is to add a version in the form "vers=1.0," in the fstab entry. But I haven't tried it and I can't really judge it - but maybe it's a starting point/workaround.

      1. Thanks Mirco, I saw it somewhere too. But to be honest, I have no idea where to put this. With the Fritzbox looks different.

        Greetings Harald

  10. Hi,
    you can also create a secure entry in the fstab with the program mount-samba or addfstab. Entering “mount-samba my files” is sufficient, for example, and the IP address etc. is determined automatically. Password and user is requested and securely hidden and not visible as readable text in /etc/fstab. Removing is just as easy.

    You can also do the whole thing via Gui by linking the program via an icon on the desktop. Then simply drag the network drive to the icon and the Windows share will be automatically mounted. Of course, again with a password and user query.

  11. Extreme security risk! Another user can read the login data. Thus, even if he is on the same network, he can access the data, etc.

  12. // /home/fabi/Windows cifs defaults,username="windows_username,password="windows_password"

    If I then try to mount it with "sudo mount -a" I always get the error message "mount: mount point /home/fabi/Windows does not exist" and what can you do about it

  13. Hallo,
    it's the same for me, it doesn't work without "sudo mount -a".
    But I noticed that it is only like that if the laptop is connected via WiFi.
    It works wonderfully via LAN.

    Is there a possibility in Ubuntu 16.04 that the fstab file might be loaded later or the WiFi driver might be loaded earlier?


  14. Hallo,
    thanks for your guidance.
    It worked so far, but unfortunately I can't write to the drive.
    When I look at the permissions on the folder, it belongs to root and not my user.
    How do I get that out that I get changed?
    Sorry, I'm a complete newbie to Linux :-(
    Used Kubuntu mate.
    Thank you for your help ;-)

    1. Enter your ID in the fstab under uid and gid. You get this if you as a user issue the command id in the terminal. The entry in the fstab then looks like this based on the example above:

      // /home/username/Serien cifs uid=1000,gid=1000,defaults,username=yourname,password=yourpassword

      At least that's how it works for me when I write.

  15. I've been using Linux for the first time since yesterday and guides like this ensure that it's been a great user experience so far. :-)

  16. I use Linux Mint 17.3 and integrated my QNAP NAS folders in this way, but they are all read only?! How can I change this as a newbee?

    For example:
    // /home//music cifs defaults,username=,password=

    1. You can simply pass a local user as a cifs option, in your example for the user "sven":

      // /home//music cifs uid=sven,defaults,username=,password=

      The mounted folder then belongs to the transferred user - and he has write rights accordingly.
      Options such as file_mode=0777, dir_mode=0744 and all sorts of other settings can also be used here if there is a need:

      1. Unfortunately, that doesn't work for me. The NAS can now be seen in the file manager, but without write permissions. When entering the command it says: bash - // not found (Linux Mint)

      2. You mean the variant with the transferred local user? So here "sven"? In any case, the message "...not found" doesn't seem to fit the problem of missing write permissions. "Not found" is usually an indication of any errors in path information (typos, special characters, forgotten slashes). Check whether all paths are correct, whether the transferred user also exists and whether the mount point, i.e. the folder in which the share should be located, has also been created.
        If it's a permissions problem, please post your original fstab entry (without passwords...) and some system info. Is the folder shared correctly on the NAS? Are the login details correct? Just to clarify: If you transfer a local user, "sven" in the example, the username and password of a NAS user account that has write access to the NAS folder must still be specified as login data.

      3. Hello Mirco, first of all thank you very much for the answer. Having said that, I'm a Linux novice.

        It must be a rights problem, because after I added /etc/fstab according to the instructions, the NAS (Buffalo LS/WXL R1) appears in the file explorer (Nemo), but with a lock. I can see all files but change nothing. If I start Nemo with administrator rights, the lock is gone and I can change everything as normal. The NAS can be addressed from the Windows PCs without any problems.
        Addition in /etc/fstab:

        // /home/gugu/share_x cifs auto,defaults,_netdev,noserverino,user=gugu,passwd=xxx

        As you can see, the mount point is /home/gugu/share_x

        Greetings and thanks again !!

      4. Thanks Mirco Lang, handing over the local user as a cifs option did the trick.
        I had already mounted my NAS paths without this cifs option for some time until my computer refused to do this in the last few days with the message only root can mount ...
        So I looked again at this article and, as I said, added the UserID and it works again.
        In my case it's technically a Medion NAS and a Mint 17.3.

      5. Hallo,

        I'm also new to using LinuxMint and wanted to mount some folders of my WDMyCloudEX2Ultra on system startup.
        I created a fastb file with xed and inserted the following
        // /home/sandro/desk/public cifs uid=Sandro,defaults,username=Sandro,password=*******
        Unfortunately I get the error Mount: /home/sandro/desk/public: the operation can only be performed by the root user.
        Can someone tell me where my mistake is?

      6. If you use the entries in the running system

        mount -a

        you should get exactly this message, since this is actually only possible via root, i.e. under Mint:

        sudo mount -a

        The command is executed with root rights via "sudo", i.e. you will then be asked for the root/admin password.

        FYI: In other distributions, such as Debian, this sudo tool is not available by default. You have to switch to the root user account (with the "su" command) and can then simply mount with "mount -a" without sudo in front of it.

  17. Hello Mirco,
    I'll just leave it as it is, it works so far. If I have more time, I'll try the whole procedure with my desktop PC. It can also be the case that this effect occurs due to technical runtimes in the WLAN?! We didn't get any further in the Ubuntuusers forum either.
    Thank you very much, see you soon

  18. Hello Mirco,
    the mounting of my Buffalo-NAS works both on my desktop (directly in the LAN) and on a netbook (via WLAN). However, both devices show errors when booting:
    CIFS VFS: Error connecting to socket. Abortion operation
    CIFS VFS: cifs_mount failed w/return code = -101
    It is also strange that on the netbook the mounted NAS is only shown in the file manager PCManFM 1.2.0 (Lubuntu 14.04LTS), on the desktop PC you can see a corresponding symbol of an integrated hard drive.
    As I said, it works on both PCs, only the error messages bother me.
    Does anyone have a useful tip?
    //NAS IP address/folder /home/users/media cifs credentials=/home/users/.smbcredentials,iocharset=utf8,sec=ntlm 0 0

    1. Hmmm, unfortunately I can't make that clear either. It could be that the network manager is not loaded at the time and provokes the error message. And when it starts, everything works. The simple "solution": ignore. The satisfying solution might start with dmesg - see if there's anything related to network or CIFS. And then there should be a lot of googling, because that could ultimately depend on many factors. Well, you could of course also write a script that only takes over the mounting after you have logged in ... The answer will probably not make you happy ;-(=

  19. Hallo,
    Did this in Ubuntu 15.10 as above.
    If everything works, can easily access the folder on the NAS.
    But I can't write anything on the NAS, I probably don't have the access rights and can therefore only read.

    How can I change this?
    What do I write with "password=yourpassword" if I don't have a password?


  20. Hey Hubert, you could run a cron job, for example. As root just type:
    crontab - e
    a. In the now open file you write at the end:
    @reboot mount -a
    then save and restart.

    Greeting Björn

  21. Unfortunately not for me...
    After booting, the Multimedia folder is empty and when you click on the Multimedia folder icon in the Nautilus (on the right, below "Browse network"), the following comes up: "Multimedia cannot be accessed.
    Only root can mount // on /home/hubert/Multimedia"
    Only after entering mount -a is /home/hubert/Multimedia filled with the contents of the NAS folder Multimedia.

    // /home/hubert/Multimedia cifs defaults,username=xxxx,password=yyyy 0 0

    I seem to be making a mistake somewhere?

  22. Thank you for this perfect guide! But I still have one question: is it correct that the "Series" folder can only be opened after typing sudo mount -a? This is a bit cumbersome, I would have expected to be able to use the folder immediately after booting. Like in Windows, for example, when I automatically mount "Series" as a network drive at startup.
    Did I misunderstand something or made a mistake?

  23. Works quite well until the router assigns a new IP to the Windows machine. Is there a more flexible variant with name resolution? Using the computer name instead of the IP didn't work for me...

    1. Something could certainly be tinkered with, but ultimately the current Windows IP would always have to be communicated to Linux, as with a sync solution or with dynamic IP addresses. The real question for me would be: Why do you constantly assign a new IP to Windows? Unless there is a good reason, you could simply activate the option on the router to always give the network device/Win computer the same IP, for Fritz boxes, for example, under home network/network.

    2. Hello Mirco,

      Great! My god, I've spent 3 days and nights scouring the internet for a solution to automatically re-establish the network shares on my new Unix server after reboot. I was on the verge of falling back to Windows after all.

      Your solution was my last attempt: And only this works, and right away! How did you find her? The entire Unix camp seems to know nothing of the kind.

      Thank you!


      1. Wow, I'll add having prevented a Windows relapse to the list of good deeds ;)
        The solution is actually a fairly old approach, today more and more people are pointing out the graphical possibilities of the file manager - and even if they are more intuitive, they unfortunately don't work that reliably, at least in my experience. The nice thing about old ways is that they often run on all Linux, BSD, Unix and even - due to my lack of experience it's more of a theory - Apple systems.

Leave a Comment

Your e-mail address will not be published. Required fields are marked with * marked

This website uses Akismet to reduce spam. Learn more about how your comment data is processed.

Back to Top button


Please deactivate your ad blocker.