# Access Samba shares on a Windows PC from XFCE thunar

## GOS

Hello everyone,

I use XFCE as desktop environment and Samba to share files with my MS Windows PC. 

From the view of the Windows machine everything works well. That means, that the samba server on top of my linux machine realize that the Windows User logged in is mapped onto the associated linux-user. 

From the view of the Linux machine this is not the case. Id est the user mapping doesn't work. In thunar I open the Windows machine by "smb://machinename". Then I have to enter an appropriate Windows user name and password. Not till then I can access the shared folders on the Windows machine. That means, that the combination of thunar and samba make a wrong linux to windows user mapping. 

What should I set up to make it work? Any ideas??

Best regards

GOS

----------

## audiodef

 *GOS wrote:*   

> In thunar I open the Windows machine by "smb://machinename". Then I have to enter an appropriate Windows user name and password. Not till then I can access the shared folders on the Windows machine. 
> 
> 

 

Seems to me that's exactly the way it's supposed to work so...

 *GOS wrote:*   

> 
> 
> That means, that the combination of thunar and samba make a wrong linux to windows user mapping. 
> 
> 

 

I'm not understanding what exactly is wrong.

----------

## GOS

Hello again,

thanks for your answer!

I desire, that "thunar with samba" map the unix unsername - i logged in with into X - to a Windows unsername and submit this one to the Windows machine so that I don't have to put in this data manually when I access Windows shares from a linux machine. 

In the opposite direction that's no problem. Windows submits the username to the samba server and samba looks into a mapping table (smbusers) and know then for example "root=Administrator". If "Administrator" and "root" use the same passwords, i can read the samba-shares without a new user and password inquiry, when I'm logged in as "Administrator" on my Windows machine.

In summary: Why don't "thunar with samba" look into smbusers?

Best regards 

GOS

PS: Excuse my English!

PPS: "root" is only an example. I don't use my root account as user!

----------

## audiodef

Well, I'm not an expert at this, but I do know it's a good idea to have to provide credentials when you map a network drive, for security reasons. This seems like standard Linux behavior to me. It's Windows that "tries to make it easier" and thus a little less inherently secure. I would leave things the way they are, although I suspect you can in fact get it working the way you want, if you really want to do it that way.

----------

## GOS

It's not Windows that makes it easier. It is Samba, because Samba provides the smbusers mapping table. 

So I would expect, that is is also possible for the client and not only for the server part of samba. 

Best regards 

GOS

----------

