[Samba] Simple CIFS Linux permission

Gary Dale garydale at rogers.com
Wed Sep 2 07:53:05 MDT 2009

Willem P. Botha wrote:
>> Willem  wrote:
>> I connect my Linux clients with a fstab entry:
>> //   /mnt/fileserver              cifs   
>> credentials=/home/.auth,rw,soft  0 0
>> The connection works fine on boot.
>> How do I map this remote uid to the local uid?
>> Gary wrote:
>> In the credentials section of the entry in /etc/fstab, put in 
>> username=<whatever>,domain=<whatever>.
>> Otherwise, change your authentication system to use Samba for your
>> Linux clients as well.
> Gary, I tried adding the username=fileserver,domain=msheimnetz but it
> has no effect. 
> I am a bit confused, as the "credentials=/home/.auth" file already
> contains this info, and it connect 100% with no username password
> request. 
> If I can explain it better: 
> I can connect to the share, read the files, and even copy them, but can
> not save them. If I view the permissions the files are listed as
> belonging to admin(UID 501 on local machine) and it should say
> fileserver(UID 501 on remote machine). The current user in this case is
> user5(UID 507 on local machine) 
> Thus no matter what I do I keep getting the problem that the users can't
> save the files, cause the UID mappiWillem P. Botha <willem.botha at adticket.de>ng is not made. 
> Is there not a way to tell Samba that files belong to the remote UID
> rather than the local UID. And if I authenticate as the remote user, why
> is the local UID being used when writing? 
> All I actually need is a common shared fileserver. No fancy rights, or
> anything, just a shared network drive that everyone can use to save
> documents, no permissions required really. Maybe I am going about this
> the wrong way. 
> Thanks for the reply :)
Your situation is very confusing. Your server name is, according to your
smb.conf line:
        netbios name = fileserver
and you are also forcing all users to connect as username & group
        force user = fileserver
        force group = fileserver

The force user tells Samba to connect as user "fileserver" no matter
what id the user connects with. However, if your .auth file already is
telling Samba that you are connecting as fileserver, this should have no

I note that you also have guest ok = yes in your smb.conf. It is
possible that you are not connecting as user fileserver, possibly due to
a .auth file error.  You may be connecting as guest which may still have
read access but probably not write. Try manually connecting without
specifying a password in the .auth file. See if you get an error message.

More information about the samba mailing list