[Samba] Client access without asking password

Turnkey Solutions (Mark Dueck) mark at turnkey.bz
Sat Mar 27 00:03:08 MDT 2010



On 03/26/2010 11:32 PM, Tim Bates wrote:
> Yassine AYACHI wrote:
>> Hi All,
>>
>> I want to configure my samba [version 3.4.0] to permit access from
>> windows
>> clients without asking password,
>>
>> can any one propose me an example of configuration witch allows this,
>>
>> Thanks in advance,
>>
>> Yassine
>>   
>
> On one of my work boxes I have one of the following (I can't remember
> which and I'm not there):
>
> map to guest = bad user
> or
> map to guest = bad password
>
>
> This will make Samba access things as guest if they are not sending
> correct username/password. Remember that this will mean all users not
> already logged in will access shares as guest if guest is allowed in
> those shares. I specifically deny guest access to most shares on my
> work server to be sure I am preventing this. The few that need guest
> access deny write access to guest.
>
> TB
I'm not exactly sure of which lines do allow it, but the following
example works good. -- make sure the paths are correct, they might not
match your distro.   As you'll see, data and files allow guest, but
secureData does not.

[global]
        wins support = yes
        name resolve order = wins lmhosts hosts bcast
        workgroup = workgroup
        printing = cups
        printcap name = cups
        printcap cache time = 750
        cups options = raw
        map to guest = Bad User
        logon path = \\%L\profiles\.msprofile
        logon home = \\%L\%U\.9xprofile
        logon drive = P:
        usershare allow guests = Yes
        add machine script = /usr/sbin/useradd  -c Machine -d
/var/lib/nobody -s /bin/false %m$
        domain logons = No
        domain master = No
        netbios name = netbiosname
        guest account = guest
        security = share
        local master = yes
        os level = 35
[data]
comment = DATA
path = /home/shares/data
public = yes
browsable = yes
writable = yes
guest ok = yes
available = yes

[files]
comment = Other Files
path = /home/shares/files
public = yes
browsable = yes
writable = yes
guest ok = yes
available = yes

[secureData]
comment = Secure DATA
path = /home/shares/secureData
public = yes
browsable = yes
writable = yes
valid users = username
guest ok = no
available = yes





More information about the samba mailing list