When you say it ‘works fine’, do you mean you can view the shares but not write to them unless you are root?
Or do you mean you can’t view shares at all as any user other than root?
If it’s the first one, being unable to write as a user other than root, it’s probably just that you need to change permissions on the server’s shared directories
If it’s that you can’t log into the server using any of the user accounts then it may be that you simply haven’t added them as samba users, having a user account doesn’t automatically give access to samba shares
The way to do it is add them as samba users with the command smbpasswd -a
smbpasswd -a someuser would add someuser as a samba user, it asks for a password and the password you enter there is the one they would use to access the samba shares, whether or not you make it the same as their ‘normal’ login password for the machine is up to you
I scratched my head a bit on that one myself first time I set up samba before some helpful person asked me if I’d added samba users, like you I didn’t realise I had to
I believe you can use pam for samba authentication, but I’ve never done it that way so I can’t help you there
Using ldap is I think the way it’s done if you’re using samba as a domain controller … and I have even less of a clue in that area, someone like swerdna might be the best bloke to advise you there
Though if you simply want users to have the samba password as their logon one (without having to go configuring a whole pile of stuff), you can just use the same password when you add them as a samba user with smbpasswd
Just means if you change someone’s system password you’d also need to change their samba password to match, but as it only takes a few seconds unless you’re going to be changing lots of users passwords regularly, not really a problem
This page looks pretty informative for using the unix accounts as samba authentication, it’s aimed at debian but I’d imagine the principles are the same, not tried this myself but it’s worth a read at least