From: Willem P. Botha on
>Willem wrote:
> I connect my Linux clients with a fstab entry:
> //192.168.1.127/sharefiles /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 mapping 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 :)

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Gary Dale on
Willem P. Botha wrote:
>> Willem wrote:
>> I connect my Linux clients with a fstab entry:
>> //192.168.1.127/sharefiles /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(a)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
affect.

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.

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Willem P. Botha on
> >
> 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
> affect.
>
> 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.
>
A test with no password in my .auth file proved NOT to work, so this
means I can't connect to the server without the right
username/password..

I did this force user and group to enable everybody in the company to
read and write to the shared folder...

I am just completely unhappy that the Windows works 100% and the Linux
not... This is just wrong :(

Be that as it may...If you don't feel like breaking your head on this,
could you maybe help me with creating a samba conf that would require no
authentication, and have read/write access for all... This was the
original idea....Just a simple shared folder for all on the network.

Sorry for messing up your head with my confusing configurations :D

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Gary Dale on
Willem P. Botha wrote:
>>>
>>>
>> 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
>> affect.
>>
>> 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.
>>
>>
> A test with no password in my .auth file proved NOT to work, so this
> means I can't connect to the server without the right
> username/password..
>
> I did this force user and group to enable everybody in the company to
> read and write to the shared folder...
>
> I am just completely unhappy that the Windows works 100% and the Linux
> not... This is just wrong :(
>
> Be that as it may...If you don't feel like breaking your head on this,
> could you maybe help me with creating a samba conf that would require no
> authentication, and have read/write access for all... This was the
> original idea....Just a simple shared folder for all on the network.
>
> Sorry for messing up your head with my confusing configurations :D
>
>
OK. So now try removing the credentials entirely. Also, set the log
level in smb.conf to 10 and restart it. Then connect from the command
line (as root) using -o username=fileserver,domain=....

See if you get an error message and also check the logs.

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Willem P. Botha on
> OK. So now try removing the credentials entirely. Also, set the log
> level in smb.conf to 10 and restart it. Then connect from the command
> line (as root) using -o username=fileserver,domain=....
>
> See if you get an error message and also check the logs.
>
OK, first off, no matter what I do, I have to provide a password... or
else I can't connect. Regardless if I add a domain or not. The security
is set to user level, so this is what I think should happen...or am I
wrong?

Log level 10 is Crazy man... :-O

If I give the password, then it connects fine. The log file said :
connecting to <service> initially as fileserver(gid uid pid)....

if I unmount the service the log file also response with a connection
closed..

So it is allowing me to connect no problem, but still the problem is
that the files on the share, is mapped to my local user-list, so Samba
is not actually giving me any error.
When I try to copy a file on this share, the log file does nothing !

It seems my local machine is preventing this from happening, not samba.
It seems to figure out that the uid and gid for the remote folder is set
to something else than the current user, and thus preventing me from
writing to this service.

The remote machine provides me a folder with write access for uid=501
and gid=501

The local machine sees a folder with write access for uid=501,gid=501
My current user is uid=503, hence the permission denied.

My problem is not the connection.. it's writing files. Still I am lost
at how to map the remote uid to the local uid, or the authenticated
user..??




--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba