You are not logged in.
Hi,
I am trying to comprehend Samba's behaviour on one of my systems and thus I'd
like to ask a couple of quick questions:
The setup I'd like to build is just a small home network for file-sharing using guest connections.
Here it goes,
1) When using the following settings for guest connections,
map to guest = bad user
guest account = nobodydoes user 'nobody' have to exist both on Samba AND on the system's accounts?
If yes, is there any other way I can use Samba to serve guest connections without the need to create their respective system accounts? Why is that so?
2) If I change the second option to
guest account = myUnixAccountNameI notice that the system works perfectly well and serves guest connections just fine.
But how is that possible since myUnixAccountName doesn't exist on Samba?
Thanks in advance!
Offline
The results you got from (2) should answer the (first) question in (1), and `man smb.conf` also says the guest account has to be an existing UNIX user (no Samba account needed). It's just used for filesystem permissions etc., since guests don't need a password anyway.
Are you happy with that or do you want it the other way around, i.e., a samba account without a unix account for guests (the bit about 'without the need to create system accounts') ? I don't think that's possible/makes sense.
Offline
The results you got from (2) should answer the (first) question in (1), and `man smb.conf` also says the guest account has to be an existing UNIX user (no Samba account needed). It's just used for filesystem permissions etc., since guests don't need a password anyway.
Are you happy with that or do you want it the other way around, i.e., a samba account without a unix account for guests (the bit about 'without the need to create system accounts') ? I don't think that's possible/makes sense.
Thanks for the quick response!
You've got me completely covered about guest connections.
However I still would like to know one final thing;
From I understand so far whenever a user wants to connect to a samba server, he/she will have
to eventually assume the identity of a UNIX user for filesystem permissions etc. as you already mentioned above.
Thus I conclude that there are 2 levels of security in filesharing. The first one is what samba allows users to see and
the second and most important is what the underlying unix system allows users to do.
In a scenario where there are 2 users alice and bob, say alice wishes to share her wallpapers in /home/alice/wallpapers.
However that folder's permissions are set to 0700. In smb.conf the wallpapers folder is made available with both reading and writing
permissions for alice and bob. Will bob be able to access and download alice's wallpapers or will he be blocked by the UNIX file permissions?
P.S. I also read here https://help.ubuntu.com/10.04/servergui … urity.html that the libpam-smbpass package syncs UNIX users and passwords with the Samba user database. Does this mean that samba and UNIX passwords can't be different?
Thanks again
Offline
The access rights granted by the server are masked by the access rights granted to the specified or guest UNIX user by the host system. The server does not grant more access than the host system grants.
So Bob's attempts to touch the wallpapers should be blocked. (But then, why such restrictive permissions for a directory you want to share?) Maybe there are workarounds for cases like this, but you would have to do some searching (or wait for more replies).
The pam_smbpass module from that Ubuntu package seems to be included in Arch's samba package, but until you decide to configure pam to use this, passwords can still differ.
Offline
I am completely covered.
Thank you very much for your time and answers
Offline