LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   samba - anonymous + write for user (https://www.linuxquestions.org/questions/linux-networking-3/samba-anonymous-write-for-user-4175571518/)

funnyman7 02-05-2016 10:00 AM

samba - anonymous + write for user
 
hello, may I ask you for help about samba?

I want my samba server to have shares which are Read accessible to anyone (without any logging, just doubleclick) and also RW accessible for me (I have admin account there).

there will be me connecting on linux mint, windows xp and windows 7 and about 15 other people with no accounts on server, running everything possible. They are not the same people, so giving them account on server is nonsense.

So far I can see the shares on my win 7 computer but I cant open them without asking for permissions.

samba is running on raspbian jessie.

Emerson 02-06-2016 10:19 PM

I'd use webfs to give read-only access over HTTP instead.

Ser Olmy 02-06-2016 10:46 PM

There are two sets of permissions to consider here:
  • the permissions on the Samba share, as specified in smb.conf, and
  • the file system permissions on the directory to be shared
Both have to allow access for the directory to become available.

For anonymous access, you will need to map "Bad User" to guest, allow guest access to the share, and make sure the guest account has at least read permissions on the directory. Then you'll have to add your own account to the "valid users" list for the share.

You can handle the read vs. write permissions issue in (at least) two ways:
  1. Give all users write permissions on the share with the "read only = no" parameter, and control access using Unix permissions on the underlying files and directories
  2. Specify "read only = yes" on the share, and then list relevant accounts/groups that are to have write access using the "write list = <account> [<account>]" parameter
If you're not using the AD/Domain Controller functionality in Samba, using "write list" is probably the easiest way to accomplish what you want.

Should you find that you need to ask further questions regarding the actual implementation, please post the (sanitized if necessary) contents of smb.conf as well as the output of ls -l <directory> for the directory you're trying to share.

funnyman7 02-13-2016 02:53 PM

Thank you. I recently set up webfs, because I consider it easier and faster. It was quite straightforward, I spent most time with permissions. Right now it's working as expected.

I am going to set up samba in next two weeks. I have a lot of (nearly 15) unsuccessful attempts with samba configuring - every time something was not quite what it should be, so I will gladly use of any help.


All times are GMT -5. The time now is 07:50 AM.