samba share multi user access

', enableHover: false, enableTracking: true, buttons: { twitter: {via: 'aravikumar48'}}, click: function(api, options){ api.simulateClick(); api.openPopup('twitter'); } }); $('#facebook').sharrre({ share: { facebook: true }, template: '
', enableHover: false, enableTracking: true, buttons:{layout: 'box_count'}, click: function(api, options){ api.simulateClick(); api.openPopup('facebook'); } }); $('#pinterest').sharrre({ share: { pinterest: true }, template: '
', enableHover: false, enableTracking: true, buttons: { pinterest: { description: 'samba share multi user access',media: '' } }, click: function(api, options){ api.simulateClick(); api.openPopup('pinterest'); } }); $('#linkedin').sharrre({ share: { linkedin: true }, template: '
', enableHover: false, enableTracking: true, buttons: { linkedin: { description: 'samba share multi user access',media: '' } }, click: function(api, options){ api.simulateClick(); api.openPopup('linkedin'); } }); // Scrollable sharrre bar, contributed by Erik Frye. Awesome! var $_shareContainer = $(".sharrre-container"), $_header = $('#header'), $_postEntry = $('.entry'), $window = $(window), startSharePosition = $_shareContainer.offset(),//object contentBottom = $_postEntry.offset().top + $_postEntry.outerHeight(), topOfTemplate = $_header.offset().top, topSpacing = _setTopSpacing(); //triggered on scroll shareScroll = function(){ var scrollTop = $window.scrollTop() + topOfTemplate, stopLocation = contentBottom - ($_shareContainer.outerHeight() + topSpacing); $_shareContainer.css({position : 'fixed'}); if( scrollTop > stopLocation ){ $_shareContainer.css( { position:'relative' } ); $_shareContainer.offset( { top: contentBottom - $_shareContainer.outerHeight(), left: startSharePosition.left, } ); } else if (scrollTop >= $_postEntry.offset().top - topSpacing){ $_shareContainer.css( { position:'fixed',top: '100px' } ); $_shareContainer.offset( { //top: scrollTop + topSpacing, left: startSharePosition.left, } ); } else if (scrollTop 1024 ) { topSpacing = distanceFromTop + $('.nav-wrap').outerHeight(); } else { topSpacing = distanceFromTop; } return topSpacing; } //setup event listeners $window.on('scroll', _.throttle( function() { if ( $window.width() > 719 ) { shareScroll(); } else { $_shareContainer.css({ top:'', left:'', position:'' }) } }, 50 ) ); $window.on('resize', _.debounce( function() { if ( $window.width() > 719 ) { shareMove(); } else { $_shareContainer.css({ top:'', left:'', position:'' }) } }, 50 ) ); });


My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn MoreView all Posts

5 Responses

  1. msdudhani says:

    Hi Ravi,

    i am getting below error while configure the samba client.
    Error details:
    [root@bgclient01 sbin]# mount -a
    /sbin/mount.cifs: invalid option — ‘t’

    Usage: mount.cifs -o

    Mount the remote target, specified as a UNC name, to a local directory.


    Less commonly used options:

    Options not needed for servers supporting CIFS Unix extensions
    (e.g. unneeded for mounts to most Samba versions):

    Rarely used options:

    Options are described in more detail in the manual page
    man 8 mount.cifs

    To display the version number of the mount helper:
    mount.cifs -V

    Configuration File Details:

    [root@bgclient01 sbin]# vi /etc/fstab

    # /etc/fstab
    # Created by anaconda on Mon May 30 09:32:40 2016
    # Accessible filesystems, by reference, are maintained under ‘/dev/disk’
    # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
    UUID=93feecc8-8474-493b-a9e7-c0290421dc7d / ext3 defaults 1 1
    UUID=1fcf2890-98f5-4b69-9db1-35641bcc3826 /boot ext3 defaults 1 2
    UUID=6c5e689a-28c0-4eab-a7ec-f76e547c19f7 swap swap defaults 0 0

    //10.xx.xx.xx/multiuser /nfssamba cifs,credentials=/root/access,defaults,multiuser,sec=ntlmssp 0 0

    Please help to resolve on this.

    Mahesh Dudhani

    • Syntax what you have written in /etc/fstab file is correct but did you enabled the Firewall ports from server and SELinux context. Try to mount manually without adding an entry in /etc/fstab file use #mount //server/ShareName /mountpoint -o username=user

      while mounting you have to use share name .i.e.[mutiuser] not directory path.

  2. D says:

    fstab entry seems incorrect. There is a comma after cifs. I reckon the two options are separate, and mount options.

  3. James says:

    Hi Ark,

    Thanks for your tutorial. Very informative.

    Just one question: how to use the cifscreds command? I understand it is for the Samba multiuser environment, but I don’t know how to get it worked. My hypothetical environment is as follows:

    Server Side (
    1) Two Linux users: user1 user2. Both belong to group sambagroup.

    2) Added both users to Samba user database via ‘smbpasswd -a user1’ and ‘smbpasswd -a user2’

    3) mkdir /sambashare; chgrp sambagroup /sambashare; chmod 2770 /sambashare

    4) Edited /etc/samba/smb.conf accordingly. All services, firewall, and SELinux are configured properly. Shared folder can be accessed and mounted from remote clients.

    Client Side
    1) Add following to /etc/fstab:

    // /sharedfolder cifs _netdev,multiuser,credentials=/root/smbpass 0 0

    2) Added user1 login information into /root/smbpass:


    3) mount -a can mount remote folder.

    Now if I use ‘touch testfile’ in the folder, the file owner is always user1. I suppose this is where the cifscreds comes in, but don’t know how it worked. What should i do so that I can create a file under the owner user2?

    Thank you very much!

Leave a Reply

Your email address will not be published. Required fields are marked *

Exit mobile version