Samba won't start (getting errors)

Hi,

I’m trying to setup samba to share folders over my local network. I’m running OpenSUSE Tumbleweed.

I went into YaST Services and started nmb and smb. The former (nmb) started fine but I got errors with smb. I thought initially it started up OK but now it’s not. I read the logs but I don’t understand what went wrong.

I also made sure that the YaST Samba Server was setup (and everything seems to be OK). I have not enabled the guest access there (I mention this because the logs mention guest).

I’m including the logs below. If anyone could help me figure this out, I’d appreciate the help so much. Thanks in advance!

Logs:
smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2021-02-01 23:35:38 EST; 1min 52s ago
Process: 21967 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)
Process: 21971 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=255/EXCEPTION)
Main PID: 21971 (code=exited, status=255/EXCEPTION)
Status: “Starting process…”

Feb 01 23:35:37 localhost.localdomain systemd[1]: Starting Samba SMB Daemon…
Feb 01 23:35:38 localhost.localdomain smbd[21971]: [2021/02/01 23:35:38.013228, 0] …/…/source3/auth/auth_util.c:1402(make_new_session_info_guest)
Feb 01 23:35:38 localhost.localdomain smbd[21971]: create_local_token failed: NT_STATUS_INVALID_PARAMETER_MIX
Feb 01 23:35:38 localhost.localdomain smbd[21971]: [2021/02/01 23:35:38.013272, 0] …/…/source3/smbd/server.c:2052(main)
Feb 01 23:35:38 localhost.localdomain smbd[21971]: ERROR: failed to setup guest info.
Feb 01 23:35:38 localhost.localdomain systemd[1]: smb.service: Main process exited, code=exited, status=255/EXCEPTION
Feb 01 23:35:38 localhost.localdomain systemd[1]: smb.service: Failed with result ‘exit-code’.
Feb 01 23:35:38 localhost.localdomain systemd[1]: Failed t

Please post the output of

testparm

Thanks for your reply. :slight_smile:
Here is the result of testparm:

testparmLoad smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed
idmap range not specified for domain '*'
ERROR: Invalid idmap range for domain *!


Server role: ROLE_DOMAIN_MEMBER


Press enter to see a dump of your service definitions


# Global parameters
[global]
	logon drive = P:
	logon home = \\%L\%U\.9xprofile
	logon path = \\%L\profiles\.msprofile
	map to guest = Bad User
	printcap name = cups
	security = DOMAIN
	usershare max shares = 100
	idmap config * : backend = tdb
	cups options = raw




[homes]
	browseable = No
	comment = Home Directories
	inherit acls = Yes
	read only = No
	valid users = %S %D%w%S




[profiles]
	comment = Network Profiles Service
	create mask = 0600
	directory mask = 0700
	path = %H
	read only = No




[users]
	comment = All users
	inherit acls = Yes
	path = /home
	read only = No
	veto files = /aquota.user/groups/shares/




[groups]
	comment = All groups
	inherit acls = Yes
	path = /home/groups
	read only = No




[printers]
	browseable = No
	comment = All Printers
	create mask = 0600
	path = /var/tmp
	printable = Yes




[print$]
	comment = Printer Drivers
	create mask = 0664
	directory mask = 0775
	force group = ntadmin
	path = /var/lib/samba/drivers
	write list = @ntadmin root




[BACKUP_PLUS]
	comment = BACKUP_PLUS
	inherit acls = Yes
	path = /run/media/username/Backup Plus
	read only = No

(I replaced my actual Home Username with the generic “username” above in the Backup Plus path.)

Are you really wanting a domain configuration, or was a stand-alone server your intention? The former is generally only used in enterprise situations where there is a domain controller employed to handle security authentication in a network domain.

A standalone samba server uses

security = user

Gosh no! I don’t want anything complex. I just wanted to be able to access the files on the external HDD that plugged into one computer from the other (across OSs). I don’t want any kind of enterprise complex system. Simple.

I left the configuration as default and didn’t realize that it defaulted to “domain”. I’ll try changing it to user! Fingers crossed. I’ll report back.

I’m SOOO close now. HUGE thanks to @deano_ferrari - your instructions to change to user from domain worked a treat. Samba is finally running!

However, I think I may have missed something. I’m trying to get in from my other computer. It can connect just fine but when I enter my OpenSUSE username and password, it doesn’t work. I thought the way it was setup, I should use those credentials to log in. Should I or do I need to setup specific usernames for samba? Do I do this through YaST (which is where it already is setup for users) or do I need to manually do something in either the samba config or one of the other files in the samba folder?

I did (briefly) see the folders I shared (when I tried to login as guest, even though I have guess access disabled). I just became desperate when my Linux username/password credentials didn’t work. All that to say, samba is working and the folders were there. I just can’t access them yet. I’m so excited and so wanting to get this working. I’ve been wanting to do so for nearly two years but previous distro didn’t support samba. I can’t wait to have network folder access!

Yes, you are close!!! Create a samba user…

sudo smbpasswd -a <samba_user>

it will then prompt you for a password. (Replace ‘<samba_user>’ with the desired username.)

IT WORKED!!! Thank you SO much for all of your help. I’m truly grateful. I couldn’t have done it with you. :smiley:

I can’t believe it! After all this time… I FINALLY have samba working across my computers! I’m so excited about this. It will certainly make things easier.

Amazing!

Thanks again. You’re a super genius!

Well done!!! :smiley: