OpenWrt Forum Archive

Topic: luci-samba package - how to get it working properly

The content of this topic has been archived on 3 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Ok, maybe I'm just an id10t when it comes to configuring Samba. I've got it to work in the past, using optware on dd-wrt and in various linux distros...  but I can't for the life of me get authentication working properly on OpenWRT.

Here's what I've done:
- Start by building OpenWRT with luci-samba (which includes samba3) or opkg installing luci-samba and samba3. Verify smbd is running.
- Set up a simple share to share the /mnt/sda1 as 'data' , guest OK. Should be wide-open, but attempts to list shares or browse any share prompts for a user/pass. Nothing the client provides works. (Tried windows 7 and linux)
- smb.conf.template has guest account = nobody. Added map to guest = bad user. That has always fixed guest access before, but not this time.
- If I edit smb.conf.template to set security = share, I can list shares and access shares that are set public. I still can't access shares that aren't public. I really don't want to have all shares public.
- I see smb.conf.template has invalid users = root set. If I create a new user1 in /etc/passwd and set a password for user1 with smbpasswd, I can log in and list shares with that user, but I still can't access a share, even if the share is public or I have user1 as a valid user for that share
- I thought maybe the user1 account isn't working. I've tried removing invalid user = root and setting a samba password for root with smbpasswd. Still doesn't work even if the client tries to log in as root. (and I know you can, because I had it that way on dd-wrt)

Essentially, the problem I'm having: any access that would require authentication isn't working, and in security = user mode, the client HAS to auth even for guest access (it fails but unknown users get mapped to guest). Windows 7 uses NTLMv2, which samba3 should support, but smbclient on linux uses legacy auth which should always work on any version of samba.

So what am I missing? Anyone get samba working on OpenWRT?

I had the same problem and I solved by creating a symbolic link

ln -s /tmp/smb.conf /etc/samba/smb.conf

Infact the script /etc/init.d/samba points to the file /tmp/smb.conf but the daemon smbd load the configuration from the file /etc/samba/smb.conf
However it is important to set the file /etc/config/samba as needed.

The discussion might have continued from here.