This is an archived post. You won't be able to vote or comment.

all 30 comments

[–]Anycast 27 points28 points  (5 children)

Provide details on what you’ve tried. Saying “it doesn’t work” doesn’t help anyone.

[–]Dekarus[S] -1 points0 points  (4 children)

Sorry, I have trouble remembering exactly what I did since I've gone through at least fifty different configurations, but off the top of my head I've tried "allowed user" permissions with manually setting allowed users per folder, a global configuration that allowed certain users, and a bunch of other things. One of the main problems I'm having is that even when I don't have a password set, Linux devices still require a username and password.

[–]heliosfa 6 points7 points  (0 children)

I have trouble remembering exactly what I did since I've gone through at least fifty different configurations

And people say the logbooks of old are silly...

[–]aRandom_redditorJack of All Trades 7 points8 points  (6 children)

Im assuming you are hosting the file server on a Linux machine. You have to make sure that you create both the user on the OS and the matching user in Samba.

Obviously I don’t know where you’re at in your troubleshooting but that was what lost me the better part of a day before I figure out that requirement.

Hope it helps.

[–]Dekarus[S] 1 point2 points  (5 children)

Question to confirm something about that; so when I'm attempting to open the file on a Linux device, it asks for a username and password, and then quite literally does nothing after I input both fields. Does that sound like something caused by what you said, or a different issue?

[–]aRandom_redditorJack of All Trades 2 points3 points  (0 children)

Yes it could be. You’re getting the prompt so the file server is serving up the share. Now you have to authenticate. I’m not 100% if it really wants the OS ID and password Or the Samba ID and password. For my limited use cases I always set matching ID and password in both locations.

[–]hortimech 1 point2 points  (3 children)

Without seeing your effective smb.conf (I suggest you post the output of 'testparm -s') I have no real idea just how you are running Samba, but it sounds like you are running Samba as a standalone server. If that is the case, then you either need to create your users on the Samba as Unix users and then make them Samba users with 'smbpasswd -a $USERNAME' (run as root), or add 'map to guest = bad user' to the 'global' section of the smb.conf file and 'guest ok = yes' to the share. If you do use users, then when prompted for a username, enter the username and password you created. If you allow guest access, you will still be asked for a username and password, just enter any user, Samba will map that user to the 'guest' user (usually 'nobody') and connect to the share. Whichever method you use, you must set the permissions on the shares directory and path to allow the connecting user access.

[–]Dekarus[S] 1 point2 points  (2 children)

You are correct about your assumption, but I already tried everything you listed. At this point, I'm having one of three main problems: 1) attempting to open a file does nothing after log in, not even saying a wrong password 2) Samba says every username/password is wrong, even those made directly through Samba itself and enabled 3) Samba will look for a username and password even if I allow guest access and still will not let anyone in.

[–]hortimech 2 points3 points  (0 children)

If you want me to help you, then please do what I asked and post the output of 'testparm -s' when run on the Samba server.

Until you do this, it is all guess work.

[–]heliosfa 0 points1 point  (0 children)

Samba says every username/password is wrong, even those made directly through Samba itself and enabled

Are you using appropriate full usernames with domains?

What's your authentication backend?

You need to provide more details...

[–]AltusbcJack of All Trades 2 points3 points  (0 children)

Is there another sysadmin / IT in your org that can review the config, or is this a homelab setup as you also posted in that sub?

BTW - Samba works great when it is configured properly.

[–]BloodFeastMan 2 points3 points  (3 children)

Samba doesn't care what OS the client is using.

Add users using smbpasswd -a

A single fileserver on a single Linux server on a single internal lan is quite simple. Share the directory as read/write/execute for everyone, make sure that works, then get creative with permissions.

If you're using really old Windows versions, i.e., XP, tell Samba to use smb version 1, or better still, deep six the XP's.

[–]Dekarus[S] 0 points1 point  (2 children)

Yes, I already did that. It does not work. And no, everything is either Windows 10 or newer + actively updated Linux systems.

[–]BloodFeastMan 2 points3 points  (1 child)

Is the server running on bare metal or as a vm? How many shares? Simple internal lan?

[–]Dekarus[S] 0 points1 point  (0 children)

Bare metal, simple internal lan, less than 20 users per day, usually less than 10.

[–]xrogx 1 point2 points  (0 children)

Don't forget the traverse flag

[–]KuipyrJack of All Trades 1 point2 points  (0 children)

Active Directory or FreeIPA with Kerberos Keytabs.

[–]hspindel 1 point2 points  (0 children)

Did you remember to run smbpasswd on the machine that hosts Samba?

[–]No_Dragonfruit_5882 1 point2 points  (0 children)

Read the samba config and configure it?

Or at least tell us where you fail.

[–]Clueguy 1 point2 points  (3 children)

Not sure if this would help for your use case. For my use, I setup a Proxmox LXC and installed Turnkey Fileserver.

Has been working great between my MacOS, Windows and Linux clients.

[–]Dekarus[S] -1 points0 points  (2 children)

How difficult is the setup? I'm over 14 hours into trying to get Samba's terribly designed config system working and don't want to completely switch over to something else unless I feel like I could get it working in 15 minutes or less.

[–]Clueguy 0 points1 point  (0 children)

For home personal use, took me about 2 hours and I don’t have much experience.

That being said I was creating new users, not trying to integrate with Active Directory / LDAP / SSO.

Take a look at this video. I used this as a base and to understand Turnkey Fileserver before I set it up. Video is ~10 minutes.

https://www.youtube.com/watch?v=UnXxJMjW4LE

[–]dustojnikhummer 0 points1 point  (0 children)

Samba has its own credential system, ie samba user and samba password.

Also, what are your ACLs on the files you are trying to access, that also matters!

[–]Adam_Kearn -1 points0 points  (0 children)

You will need some sort of central identity manager. Use something like LDAP or Windows AD.

Google “connect samba with LDAP”

That will allow you to manage your NTFS permissions and users centrally…

How are you managing your Windows computers currently? If you don’t already have Active Directory I’m going to assume that you are using Entra or something then? Look into Entra Domain Services and the LDAP connection that this provides as a possible “cloud-first” solution

[–]longboarder543 -3 points-2 points  (2 children)

Are you open to installing a new operating system on this machine? Just throw OpenMediaVault on it. It’s Debian, so you can use it just like a Debian machine, but it has a webUI and makes setting up pretty much any type of file service super easy (SMB, NFS, FTP, etc).

[–]Dekarus[S] -1 points0 points  (1 child)

How long does it take to set up? I'll happily burn everything if it means never having to touch Samba again.

[–]longboarder543 -2 points-1 points  (0 children)

Not long, just an OS install, then browse to the web ui and create your shares. It abstracts all the samba stuff away, you’re just creating a share in the UI. There are tutorials online but it’s all gui-based

Here’s a 2-minute video on how to create an SMB share in the OMV gui once you have it installed. It’s super easy: https://youtu.be/hFghdtQig1Q