fredag 18 juni 2010

Samba config without auth

Sometimes its been necessary to have a completely auth-less samba share without any username and password dialog popup, especially when scripting in Windows. It took me some time to figure out the Samba config, below is a stripped example of a working authless share. Tested with Windows Server 2008 and Windows 7, using samba 3.

Bold parts is the important ones.

#========= Global Settings =========#
[global]
workgroup = MYGROUP
server string = Samba Server

hosts allow = 10. 127.
load printers = no
guest account = nobody

log file = /var/log/samba/%m.log
max log size = 50

security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
local master = no
map to guest = Bad User

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# interfaces = 192.168.12.2/24 192.168.13.2/24
dns proxy = no

idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/false
winbind use default domain = no

#========= Share Definitions =========#

[no_auth_share]
comment = Share that does not need any authentication
path = /srv/snow
guest only = yes
guest ok = yes

Inga kommentarer:

Skicka en kommentar