Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Mounting Samba Share

  1. #1
    Join Date
    Jun 2008
    Location
    Switzerland
    Posts
    43

    Default Mounting Samba Share

    I have mounted a remote Samba share using the following fstab entry:

    //Server/Transfer /srv/Transfer/ smbfs credentials=/etc/samba/credentials/Transfer 0 0

    Now every time the Server re-boots the mounted share has to be re-mounted afterwards. Is there a way to keep this resistent?

    Best Regards
    Marcus

  2. #2
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: Mounting Samba Share

    Perhaps it'll work by adding it to [b]/etc/samba/smbfstab[b] and issue chkconfig smbfs on

    Note the slightly different layout.

  3. #3
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,731
    Blog Entries
    2

    Default Re: Mounting Samba Share

    Quote Originally Posted by MarcusMoeller View Post
    I have mounted a remote Samba share using the following fstab entry:

    //Server/Transfer /srv/Transfer/ smbfs credentials=/etc/samba/credentials/Transfer 0 0

    Now every time the Server re-boots the mounted share has to be re-mounted afterwards. Is there a way to keep this resistent?

    Best Regards
    Marcus
    Hello
    I tried wat Chrysantine suggests, let me know if it works -- I couldn't kmake it work.
    For fstab you use cifs instead of smbfs in openSUSE. Check the syntax here:
    Samba: HowTo Mount a CIFS Network Share [AKA Map Network Drive] in openSUSE 10.2, 10.3
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  4. #4
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: Mounting Samba Share

    Swerdna is right on the money here - I didn't notice it myself either - smbfs is deprecated and you should use cifs.

    /slap self.

  5. #5

    Default Re: Mounting Samba Share

    Yes, use cifs instead of smbfs - there are some funny bugs with smbfs.

    Also, for cifs, your credentials file should have:

    username=putyourusernamehere
    password=putyourpasswordhere

    Make sure there is a newline at the end of your password.

    To have the share mount upon startup every time, make sure the system service smbfs is enabled for runlevels 3 and 5.

    g

  6. #6
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,731
    Blog Entries
    2

    Default Re: Mounting Samba Share

    Quote Originally Posted by greenmachine View Post
    Yes, use cifs instead of smbfs - there are some funny bugs with smbfs.
    Just to be clear here, with respect, so others don't get confused: Smbfs isn't an option in openSUSE which comes with the more modern implementation of smbfs called cifs.
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  7. #7

    Default Re: Mounting Samba Share

    Quote Originally Posted by swerdna View Post
    Just to be clear here, with respect, so others don't get confused: Smbfs isn't an option in openSUSE which comes with the more modern implementation of smbfs called cifs.
    smbfs IS an option for openSUSE, you just have to re-compile the kernel and turn it on.

    To the thread starter, smbfs was depreciated in openSUSE (and I believe most other distributions will follow, or have followed) because of security issues. However, there is the default option and direct replacement called cifs.

    so do:

    sudo mount -t cifs //yourserver/share /your/mountpoint -o username=yourusername

    (you can do password=yourpassword, but I don't recommend that since, it is then left in your bash history and can be comprimised if someone gets a hold of your machine etc etc).
    How much can you know about yourself if you've never been in a fight. - Fight Club

    Ben Kevan's Blog - That's me

  8. #8
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,731
    Blog Entries
    2

    Default Re: Mounting Samba Share

    Quote Originally Posted by eclipseagent View Post
    smbfs IS an option for openSUSE, you just have to re-compile the kernel and turn it on.

    To the thread starter, smbfs was depreciated in openSUSE (and I believe most other distributions will follow, or have followed) because of security issues. However, there is the default option and direct replacement called cifs.

    so do:

    sudo mount -t cifs //yourserver/share /your/mountpoint -o username=yourusername

    (you can do password=yourpassword, but I don't recommend that since, it is then left in your bash history and can be comprimised if someone gets a hold of your machine etc etc).
    @eclipseagent Of course, you are quite right, but I'll add two extra cautionary points:

    Recompiling the kernel as a way to replace cifs with a deprecated filesystem is hardly an ideal "option", or even a practical one. I would recommend against that.

    Your recommendation to mount from the CLI will get MarcusMoeller tempoary access to the remote data, but may I suggest to use an entry in fstab instead because that was used in the opening post, suggesting a need for permanent access, like the several I suggested in the link:
    Samba: HowTo Mount a CIFS Network Share [AKA Map Network Drive] in openSUSE 10.2, 10.3
    Oh and BTW MarcusMoeller don't forget the option _netdev in the fstab entry.
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  9. #9

    Default Re: Mounting Samba Share

    smbfs was dropped not only for security reasons, but for weird bugs. One
    that took me a week to solve: when copying a driectory with thousands of
    files of a smbfs share, every 39th file (maybe it was 41st) would fail to
    copy with no warnings at all. Luckily, when my brain had all but exploded,
    cifs was already under development and had replaced smbfs (I didn't know it
    at the time.)

    One thing - the init script for openSUSE is called 'smbfs' not 'cifs'. It
    looks at the fstab and will mount any smbfs or cifs share. To use it from
    the command line (as root):

    'rcsmbfs start' (or stop/restart/etc.)

  10. #10
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,731
    Blog Entries
    2

    Default Re: Mounting Samba Share

    Quote Originally Posted by greenmachine View Post
    smbfs was dropped not only for security reasons, but for weird bugs. One
    that took me a week to solve: when copying a driectory with thousands of
    files of a smbfs share, every 39th file (maybe it was 41st) would fail to
    copy with no warnings at all. Luckily, when my brain had all but exploded,
    cifs was already under development and had replaced smbfs (I didn't know it
    at the time.)
    That would be just the pits.
    One thing - the init script for openSUSE is called 'smbfs' not 'cifs'. It
    looks at the fstab and will mount any smbfs or cifs share. To use it from
    the command line (as root):

    'rcsmbfs start' (or stop/restart/etc.)
    Thanks for that. Does that have anything to do with smbfstab? I've not yet been able to mount a share using smbfstab to cause it to mount at boot time (or any time) and can't find out why. Is that a cause?
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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