# Samba and the guest account

## luca

Hi All

I can't get my samba working properly on my gentoo system!!

Its running fine, but I can't loging as guest, I think it should loging automatically, but keeps asking for username and passwd????

Here is my smb.conf :

```
# from localhost (127.0.0.1)

# Date: 2003/04/04 14:49:16

                                                                                

# Global parameters

[global]

        workgroup = Home

        netbios name = powerr

        server string = powerr

        bind interfaces only = Yes

        encrypt passwords = Yes

        update encrypted = Yes

        preferred master = No

        local master = No

        domain master = No

        guest account = guest

        hosts allow = 192.168.

                                                                                

[public]

        comment = Music

        path = /music

        read only = Yes

        guest ok = Yes

        guest only = no

```

Thanks in advance

Luca

----------

## GentooBox

I had the same problem with samba 3.0.5

try to insert "security = user" in the global section

EDIT: The security = user dident help me...

----------

## Fortean

 *luca wrote:*   

> 
> 
> ```
> 
>                                      
> ...

 

First of all, make sure the permissions for /music are right - They should be 666 (chmod 666 /music should do it). Afterwards, you should put in these missing options:

browseable = yes

force user = user (should be a user that has write permissions to the folder)

read only = yes

Do a /etc/init.d/samba restart and it should work.

----------

## luca

Hi 

Thanks for the suggestions, here is how my smb.conf looks right now:

 *Quote:*   

> [global]
> 
>         workgroup = home
> 
>         netbios name = powerr
> ...

 

here is a listing of that directory:

drw-rw-rw-  35 guest users       1024 Jul 20 12:02 music

But it still asks for a password when I login as guest....?????

LucaLast edited by luca on Fri Jul 30, 2004 12:52 pm; edited 1 time in total

----------

## Fortean

 *Quote:*   

> 
> 
> [Music]
> 
>       comment = Music
> ...

 

The user identified in "force user" has to be a user who has permissions to the folder you want to share. I would put your normal username there.

----------

## luca

You're right, should be guest instead of quest and wok -> work!!

Now when I try to conenct with xfsamba I cannot acces the directory music...??

Any suggestions??

Luca

----------

## Nossie

You can try 'guest only = no' in the share definition.

----------

## luca

didn't do anything different

But what about the guest account??

Here is the line my group file:

guest:x:405:100:guest:/dev/null:/dev/null

Is this ok?

Luca

----------

## nobspangle

have you set up a samba user called guest?

----------

## luca

The only thing I know is that in my passwd file a user guest (shown above)is specified. I that not enough??

Luca

----------

## nobspangle

you need to create a samba user with smbpasswd like this

```
smbpasswd -a guest
```

----------

## Jesore

Just insert

```
map to guest = Bad User
```

in your [global] definition. All shares with

```
guest ok = yes
```

will now allow login without asking for user/pass - at least for windows workstations. You didn't mention your client OS, so I just assumed. You don't necessarily need a user called guest - nobody is the user Samba defaults to. If you really want to use your "guest" user, then insert 

```
guest account = guest
```

in you [global].

Jesore

----------

