Cannot Access SMB File Share on Ubuntu Server

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

sojourner_9

New Member
Mar 16, 2023
2
0
1
I have an instance of Ubuntu Server running in Hyper-V which is serving up a samba file share which I want to access from Owncloud to sync onto a Samsung tablet. I also need to be able to maintain this file share from my pc which is joined to a domain.
I am very new, so not too sure which details are helpful, but I set up this vm and file share with the help of tutorials from YouTube. I edited the smb.conf file, added my smb user and password, but cannot access the file share from my pc or tablet. I'm on the same subnet and can ping the server, no problem. Also, I can see the folder in My File on the tablet, but cannot sign in using my credentials. Owncloud does not even recognize the server ip.

Here is my current smb.conf file:

#======================= Global Settings =======================

[global]

## Samba Protocol

min protocol = smb2
max protocol = smb3


#### Networking ####

interfaces = eth0 eth1 lo
bind interfaces only = yes


#### Debugging/Accounting ####

log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d


####### Authentication #######

server role = standalone server
obey pam restrictions = yes
unix password sync = yes
encrypt passwords = true
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\>
pam password change = no

map to guest = bad user
guest account = nobody
security = user


############ Misc ############

usershare allow guests = no


#======================= Share Definitions =======================

create mask = 0700
directory mask = 0700
valid users = %S

comment = Users profiles
path = /home/samba/profiles
guest ok = no
browseable = no
create mask = 0600
directory mask = 0700


# File Share
[Content]
path = /mnt/Content
valid users = @user @admin
inherit permissions = yes
guest ok = no
browseable = yes




Does anyone have any thoughts on this?
 

DavidWJohnston

Active Member
Sep 30, 2020
242
188
43
One place to start would be to run the command to check the formatting of the smb.conf: testparm -s

If that yields no problems, check the log files for more information about failed attempts: /var/log/samba/

I didn't scrutinize your config file too closely, but it looks like the section with comment = "User Profiles" is under the global - I think there should be something like [Profiles] above that - But I'm not 100% sure.

How did you assign permissions and ownership (chmod & chown) to /mnt/Content?

Try that out, let me know what you find.

Also I'm wondering - Instead of manually tweaking samba in Ubuntu, you could create a TrueNAS VM and use the admin GUI to set it up, it would be far easier. Like this: How to Set Up Windows SMB Shares on FreeNAS
 
  • Like
Reactions: sojourner_9

sojourner_9

New Member
Mar 16, 2023
2
0
1
@DavidWJohnston
I'm not getting any errors with testparm -s.

There is nothing in the log files, but I can see the machines that I've used to attempt accessing the file share.

The User Profiles section was under global by default...

Permissions are:
drwxr-x--- 2 admin root 16384 Mar 13 15:32 lost+found

What are your thoughts on running TrueNas in Hyper-V? I was under the impression that running TrueNAS as a VM could cause some issues since it's not actually running on bare metal. Should I not be concerned about instability or data corruption?
 
Last edited: