Announcement

Collapse
No announcement yet.

Mount a Windows shared folder on kubuntu startup

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mount a Windows shared folder on kubuntu startup

    Hi, all. I want to mount a windows shared folder on kubuntu startup.

    I wrote this on the /etc/fstab file:

    //IP_Server/Shared/Windows/Network /home/myusername/mount/directory cifs uid=linux_user_id,credentials=/home/mysuername/Directory/with/credentials/credentiales,iocharset=utf8,sec=ntlm 0 0
    and when I clic on the icon that appears under the "Network" session of Dolphin, I get a "Only root can mount" message.
    and If I go to the /home/myusername/mount/directory its shows empty (not mounted)

    The odd thing is that I can mount it with no problem using the command:

    sudo mount -t cifs -o 'credentials=/home/mysuername/Directory/with/credentials/credentiales,uid=linux_user_id,gid=linux_group_id, sec=ntlm,vers=1.0' //IP_Server/Shared/Windows/Network /home/myusername/mount/directory
    The file in /home/mysuername/Directory/with/credentials/credentiales is:

    username=windowsDomainUsername
    password=windowsDomainPassword
    domain=windowsDomainName
    Thank you all for your help.
    Last edited by Snowhog; Jan 28, 2022, 12:32 PM.

    #2
    You're mixing actions. If you mounted it in fstab, you don't need to click on "Network" in Dolphin. All you need to do is navigate to the mount normally.

    In Dolphin, click on "Home" then the folder you mounted the share to.

    The "Network" function is to mount a share not yet mounted. You're basically trying to re-mount it.

    Please Read Me

    Comment


      #3
      Hi! Thanks for your answer!
      Ok, I did not know that.
      Either way, when I go to the mounted folder it appears empty, so I guess the fstab mount is not working, am I right?
      Thanks!

      Comment


        #4
        If you don't get an error mounting it, something else is wrong. Usually a permission or credentials problem or it may simply not be auto-mounting.

        Open up Konsole and try a couple things to troubleshoot:

        Enter "mount" and it will show if it's mounted or not and what the options are. If it's not showing in the output from the mount command, try mounting it like this

        sudo mount /home/myusername/mount/directory

        Obviously use the actual mount location there. You don't need to manually enter all the mount options because this short mount command will search fstab for the mount and return an error if it's not found.
        If it mounts, (no error and files appear), then add "auto" to your mount options.
        If it reveals an error message, you'll have something to look into. Report back...

        Please Read Me

        Comment


          #5
          Thanks all for your help.
          The problem was the missing option "vers=1.0", so the command that works is:

          //IP_Server/Shared/Windows/Network /home/myusername/mount/directory cifs uid=linux_user_id,credentials=/home/mysuername/Directory/with/credentials/credentiales,iocharset=utf8,sec=ntlm,vers=1.0,auto 0 0

          Once again thanks to all...

          Comment


            #6
            Originally posted by wago80 View Post
            The problem was the missing option "vers=1.0"
            Heck, you'd think that Windows sharing thingies would stop using the old, insecure and deprecated SMB version 1.0
            Having said that, my relatively recent ASUS router still uses it, though the dashboard does mention this, with links to enable it (on Windows of course).

            Comment


              #7
              Windows. Something best left closed.
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                I am writing to you because lately the fstab line started to fail. It mount the unit but when I try to access it in dolphin it shows a message that says: An error ocurr when accessing «//IP_Server/Shared/Windows/Network», the system answer: mount: /home/myusername/mount/directory: operation permitted for root only.

                Nothing changed in the network because if I mounted manually, using this command, it works perfectly:

                sudo mount -t cifs -o 'credentials=/home/myusername/Directorywith/credentials,uid=1000,gid=1000,sec=ntlm,vers=1.0' //IP_Server/Shared/Windows/Network /home/myusername/mount/directory

                Some ideas?

                I though using sudoers to add the last command, but I prefer to ask here in case you have a better idea...

                Thank you all in advance...

                Comment

                Working...
                X