# passwordless samba?

## numerodix

Yeah, I'd like to setup samba so that all network users (read WinXP) can access a certain samba share (or the whole samba server if that makes it easier) without passwords, regardless of their Windows usernames and passwords, without setting it up for each and every user and for it to work out of the box whenever a new client joins the network. I've tried looking at swat but so far I have only been able to evade logging in when I have the same user/pass combo on the Win box as I have on the gentoo server.

*help*

----------

## xces

You should change the value of security from user (which is the default setting) to share. (it's in /etc/samba/smb.conf)

----------

## numerodix

Yes but that only changes the security rules to per share instead of global, it doesn't change how users log on.

----------

## ozonator

Allowing guest access should do the trick.  From the smb.conf man page:  "Sections  may  be designated guest services, in which case no password is required to access them. A  specified  UNIX guest  account is used to define access privileges in this case."

There are more details in the smb.conf man page worth reading on guest access, including config examples; the "guest account" (global), and "guest ok" and "guest only" (per share) parameters in smb.conf are the pertinent config items.

----------

## siti

Heres an example of passwordless server:

```

[global]

server string = Server

socket address = 192.168.1.1

bind interfaces only = yes

interfaces = eth0 192.168.1.1/24

netbios name = Server

workgroup = The_Lan

Comment = Linux File Server

hosts allow = 192.168.

hosts deny = ALL

domain master = yes

preferred master = yes

local master = yes

oslevel = 65

security = share

follow symlinks = no

time server = yes

log level = 2

log file = /var/log/samba.log

max log size = 50

debug timestamp = no

force user = web

force group = users

force security mode = 755

browse list = yes

printing = cups

printcap name = lpstat

[File Server]

comment = Fileserver

path=/home/web/public/files

guest ok = yes

writeable = no

[Uploads]

Comment = Uploads

path = /home/web/Uploads

writeable = yes

guest ok = yes

```

----------

## numerodix

Finally! I never gave much thought to how samba users map onto user accounts on the gentoo server and the guest mapping was set to nobody, just now I realized nobody wasn't declared and had no permissions for the path corresponding to the share. *silly*

----------

## epx

I am wanting to do he same thing, but I tried your example config file and in XP it now says "Network Path Not Found" an "Inaccessable" but it works fine in Win2K. any thoughts? I copied the exact config from above but changed the force user and group to ones on my system.

----------

## siti

Can you post your smb.conf file please:)

----------

## epx

[global]

server string = TestServ

socket address = 192.168.1.101

bind interfaces only = yes

interfaces = eth0 192.168.1.101/24

netbios name = Legolas

workgroup = HOMENET

Comment = Linux File Server

hosts allow = 192.168.

hosts deny = ALL

domain master = yes

preferred master = yes

local master = yes

oslevel = 65

security = share

follow symlinks = no

time server = yes

log level = 2

log file = /var/log/samba.log

max log size = 50

debug timestamp = no

force user = storage

force group = users

force security mode = 755

browse list = yes

[File Server]

comment = Fileserver

path=/storage

guest ok = yes

writeable = no

public = yes

----------

## epx

*bump*

----------

## siti

Don't know if it will work but try changing:

192.168.1.101/24

to:

192.168.1.0/24

----------

