0

I have been hosting a few public and access-controlled shared folders (located on an external drive) using Samba 4.3.11-Ubuntu under Ubuntu 14.04. That worked very well, and exactly as desired for my small office.

The machine running 14.04 crashed, so I replaced it with a newer machine, upon which I installed Ubuntu 18.04, and the latest version of Samba available from apt, which is Samba 4.7.6-Ubuntu.

Now, the same smb.conf file that worked flawlessly on my Ubuntu 14.04/Samba 4.3.11 setup does not work on my 18.04 setup.

In fact, the only way I can get any Samba users to have any access at all is if I make them an admin user in the smb.conf file, so the admin users definition in the [global] section in the conf file below was previously commented out. It is uncommented to allow my users access, as described.

I have already tried making the [global] section minimalistic, bringing it down to a log file definition only.

What could be happening? Here's the conf file:

# Samba config file
# From UNKNOWN
# Date: 2018/01/01 00:01:26

[global]
    workgroup = safeserver
    netbios name = safeserver
    server string = SAFE File Server: %L
    #interfaces = eth0, lo, wlan0
    inherit acls = Yes
    inherit permissions = Yes
    dns proxy = no
    obey pam restrictions = Yes
    pam password change = Yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    unix password sync = Yes

    admin users = drusmor, jadams, bfranklin, gwashington, ugrant
    #admin users = drusmor
    invalid users = ccoolidge

    log file = /var/log/samba/%m.log
    log level = 1 winbind:5
    max log size = 1000

    #smb ports = 139
    #name resolve order = bcast lmhosts host wins
    logon path = \\safeserver\profiles\.msprofile
    logon drive = P:
    logon home = \\safeserver\%U\.9xprofile

    # Makes this box the master file server
    #os level = 254
    #preferred master = No
    #domain master = Yes
    wins support = Yes
    panic action = /usr/share/samba/panic-action %d
    # nodelay is default, increasing buf size helps speed, keepalive closes
    # dead connections and returns memory to system.
    #socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536 SO_KEEPALIVE
    # Set to cleanup dead connections quickly
    deadtime = 15

    load printers = no
    printable = no

[homes]
    # Added by DAR on 8 Feb 2018
    comment = Home Directories (on external shared drive)
    #invalid users = root, bin, daemon, nobody, named, sys, tty, disk, mem, kmem
    valid users = %S
    path = /media/safeserver/externaldrive/homes/%U
    read only = no
    guest ok = no
    create mask = 0700
    directory mask = 0700
    store dos attributes = yes
    browseable = no

[nbackup]
    # Added by DAR on 15 Feb 2018
    comment = Local Backup
    #invalid users = root, bin, daemon, nobody, named, sys, tty, disk, mem, kmem
    valid users = drusmor
    path = /media/safeserver/LOCAL_BACKUP
    read only = no
    guest ok = no
    create mask = 0700
    directory mask = 0700
    store dos attributes = yes
    browseable = no

[profiles]
    comment = Network Profiles Service
    path = %H
    read only = no
    guest ok = no
    create mask = 0600
    directory mask = 0700
    store dos attributes = yes
    browseable = no

#[printers]
#       comment = All Printers
#       path = /var/spool/samba
#       create mask = 0700
#       printable = yes
#       browseable = no
#
#[print$]
#       comment = Printer Drivers
#       path = /var/lib/samba/printers

[shared]
    comment = SAFE Shared Directories
    path = /media/safeserver/externaldrive/serve
    invalid users = root, bin, daemon, nobody, named, sys, tty, disk, mem, kmem
    valid users = @users
    read only = no
    guest ok = no
    create mode = 0664
    directory mode = 0770
    #inherit acls = yes
    writeable = yes

[Training]
    comment = SAFE Training Materials
    path = /media/safeserver/externaldrive/serve/Training
    #valid users = drusmor, gwashington, ugrant
    valid users = @Exec
    invalid users = jadams, bfranklin
    force group = Exec
    read only = no
    guest ok = no
    browseable = yes
    public = no
    create mode = 0664
    directory mode = 0770
    inherit acls = yes
    writeable = yes

[Recipes]
    comment = SAFE Recipes
    path = /media/safeserver/externaldrive/serve/Recipes
    #valid users = drusmor, gwashington, ugrant
    valid users = @Recipes
    invalid users = jadams, bfranklin
    force group = Recipes
    read only = no
    guest ok = no
    browseable = yes
    public = no
    create mask = 0664
    directory mask = 0770
    inherit acls = yes
    Writeable = yes

[Transferral]
    comment = CEO Transfer
    path = /media/safeserver/externaldrive/Transferral
    valid users = @ceotransfer
    invalid users = gwashington, ugrant, jadams, bfranklin
    force group = ceotransfer
    read only = no
    guest ok = no
    browsable = yes
    public = no
    create mask = 0664
    directory mask = 0770
    inherit acls = yes
    Writable = yes

Thanks for your help.

  • I should add that I have already referenced the question asked here: askubuntu.com/questions/1031101/samba-access-problem-18-04 But this does not correct the issue for me. – Dean Rusmor Jun 1 '18 at 14:31
  • More than likely some of the default samba settings changed. You would need to explicitly set the settings in your 'new' smb.conf. Locating the changes is where the real fun happens. – jc__ Jun 1 '18 at 14:46
  • Smart suggestion. I went through that exercise, using testparm -vs, and actually compared it against a backup of my old 14.04 system, but it unfortunately proved fruitless (not saying I didn't miss something, of course). There were differences, indeed, but aligning my new rig to my old rig made no difference. Am I missing something as far as this version of Samba? – Dean Rusmor Jun 4 '18 at 0:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.