Results 1 to 3 of 3

Thread: Samba homes double entry

  1. #1
    Join Date
    Oct 2009
    Beans
    47

    Samba homes double entry

    I want to share my home directory with Samba on Ubuntu 20.04. I added the below config to smb.conf and now I am seeing two entries, one called homes and the other called elliott. Is this normal? I thought it should show only one entry for this. I guess if this is intended behavior then I will add a specific share just for my own user instead.

    Code:
    $ smbclient -L localhost -U elliott
    Enter WORKGROUP\elliott's password: 
    
    
        Sharename       Type      Comment
        ---------       ----      -------
        tank            Disk      
        homes           Disk      all homes
        IPC$            IPC       IPC Service (hercules server (Samba, Ubuntu))
        elliott         Disk      all homes
    SMB1 disabled -- no workgroup available
    Code:
    [global]
       workgroup = WORKGROUP
       server string = %h server (Samba, Ubuntu)
       server role = standalone server
       security = user
       obey pam restrictions = yes
       map to guest = bad user
    
    [homes]
      comment = all homes
      browseable = yes
      read only = no
      create mask = 0700
      directory mask = 0700
      valid users = %S

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Samba homes double entry

    Yes, that's what I see.
    May want a different file create mask, BTW, so every file doesn't get marked as executable.

  3. #3
    Join Date
    Dec 2009
    Beans
    6,771

    Re: Samba homes double entry

    You are seeing the "double" entry because of the way you set up the special [homes] share and the way you are accessing it with smbclient.

    [homes] as designed was not meant to be "browseable". It was a shortcut for the server administrator to create a share for everyone on the network.

    If I have 20 clients to the server and I want them to each have a share accessible only to them individually I would have to create a share for each one of them then manage that by creating or deleting a share when clients are added or deleted from the network.

    With a [homes] share all I have to do is create a local user and the share for an individual's share is created spontaneously and with a label that matches his username - but only when asked for by the client.

    A Windows client passes the current users username automatically and without the users knowledge when he accesses a server so all he would see is his own share. A Linux client does not do that because Linux thinks that is goofy so instead he would have to ask for his own share explicitly either as a //host/user-name in fstab, a smb://host/user-name in the Linux file manager, or as you have done with a -U elliott in smbclient.

    Since you forced the [homes] share to be browseable you are seeing both.
    Last edited by Morbius1; December 6th, 2020 at 08:04 PM.

Tags for this Thread

Bookmarks

Posting Permissions

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