-   Linux - Networking (
-   -   Sambe Login, passsword not requested (

rcrosoer 02-24-2009 11:58 AM

Sambe Login, passsword not requested
I have a Samba server and 2 WIN XP clients. There are 2 home folders; Folder A is my normal home folder with the same login as the client login. Folder B has a different username and password. Connecting to the server from Client 1 is normal - if I connect to Folder A it allows me in and if I connect to Folder B it asks for the login password. If I supply it I get read and write privileges.

Connecting from Client 2 is somewhat different. Connecting to Folder A is as above but when I connect to Folder B it does not ask for the password but lets me in with read only privileges.

I log into both clients with the same username and password.

I have tried deleting all the shares and restarting Client 2 but this has no effect.

The server is running Suse 10.2 and the clients are both Win XP SP3

I guess this is really a windows problem but I have never managed to find a MS support group that covers this sort of thing and somebody must have come across this so apologies in advance.

jschiwal 02-25-2009 05:40 AM

If you want any user to have full access to a share, the use:
"map guest = bad user" in the global options of smb.conf.

In the share definition:
guest ok = yes
read only = no (for a read write share or)
read only = yes (for a read only share)

This will allow any user at all (not only yourself) to use the share. Without being authenticated, you will be mapped to the windows "guest" account. This is equivalent to the "nobody" account in Linux. The files created will be owned by nobody but from windows XP will show up as "guest".

For accessing your home directory, you may want to use authentication. In that case, run "smbpasswd -a <your_username>" on the Linux server as root and add your username & password. Now Samba can authenticate you. When you start a new session, you will be asked for your username and password, but not when you access it again.

Here is a sample globably writeable share definition:

        comment = Qosmio Laptop global share
        path = /srv/samba/laptop
        guest ok = yes
        browseable = yes
        readonly = no

For the /srv/samba/laptop share, "sudo chmod ugo=rwxt /srv/samba/laptop" was used.

Here is what I prefer for home directories:

        comment = Network Profiles Service
        path = %H                       
        read only = No                   
        store dos attributes = Yes       
        create mask = 0600               
        directory mask = 0700           
        invalid users = root             
        read list = root

You could access it using \\servername\username reguardless of which user you are. That is what the %H does. The first time you access it, you need to authenticate. After that you can go right to it. To make up for the initial inconvenience of logging in, you don't have to locate your own users directory.

rcrosoer 02-25-2009 08:49 AM

I have all those entries in smb.conf but I get this different behaviour from the 2 clients. Both clients only have 1 user; viz me. The server has 3 users; me, my alter ego and root, all have different passwords.

From client 1, logged in as me, I get read and write access to my home directory. When I connect to my alter ego home directory it asks for the password and gives me read and write access.

Trying to connect to my alter ego home directory from client 2, it does not ask for a password and gives me read only access.

I guess the problem is in the registry of Client 2.

jschiwal 02-26-2009 05:23 AM

The credentials of your alter ego is different than client 1. Since the authentication fails, you will access as guest if "guest OK = yes" is enabled for the share. The other permissions of your directory would disable writing. It wouldn't be advisable to change that. Instead, when you are logged into Windows as client 2, connect with client 1's credentials.

All times are GMT -5. The time now is 12:20 AM.