Originally Posted by jlacroix
Hello everyone, I'm trying to create a samba share but only have a specific set of users access it. The Linux server is RHEL 6 and the client accessing it is Windows 7 Ultimate. However, I'm not getting very far. I can only access the share if I uncomment "public = yes". The user account I'm logged into in Windows exists in Linux.
In /etc/samba/smb.conf I have:
server string = Linux File Server
workgroup = Work
security = share
Ha ha, have spent many hours fiddling with CIFS mounts and Samba sharing...
By the power of Google...
Here's a quick link for how to setup Samba sharing on RHEL 6.
Have you setup your Samba equivalents of Unix users (pseudo Windows users on the RHEL box)?
FYI It's also important to note that newer versions of Samba (on desktop distro's like ARCH, Ubuntu, etc. now use pdbedit
to edit and add new ('virtual' Windows users) to a Samba server backend user database. Samba >3.5 I think from memory. It's a much cleaner system IMHO.
Smbclient running on a networked Linux box is an awesome tool for diagnosing Samba connection problems - far more useful than Windows at the client
end! Use it all the time myself.
I believe you want:
if you want any kind of user access granularity for your shares. Certainly this is what I use to restrict share access (R/W for my user and RO for guests).
My laptops Samba setup is as follows (single share - accessible by my account only):
#======================= Global Settings =====================================
netbios name = xxxxxxxxxxx
workgroup = xxxxxxxxxxxxxx
server string = xxxxxxxxxxxxxxxxxxx
security = user
encrypt passwords = true
hosts allow = 192.168.xxx.xxx/255.255.255.0 127.0.0.0/255.0.0.0
interfaces = eth0 lo
bind interfaces only = yes
load printers = no
printing = bsd
disable spoolss = yes
printcap name = /dev/null
log level = 10
log file = /var/log/samba/%m.log
max log size = 1024
local master = no
os level = 50
preferred master = no
name resolve order = hosts wins bcast
wins support = no
wins proxy = no
dns proxy = no
#============================ Share Definitions ==============================
comment = Rob's account common home folder
path = /xxxxxxxxxxx
public = no
writable = no
printable = no
write list = robert
#include = /etc/samba/smb.conf.external