Web lists-archives.com

Re: [Samba] can't write Samba share as anonymous




On Wed, 23 Jan 2019 16:56:42 +0100
Andrea Cucciarre' via samba <samba@xxxxxxxxxxxxxxx> wrote:

> Hello,
> 
> I'm trying to access a Samba share as anonymous/guest user, so I have 
> added the following entry inf file smb.conf (Samba 4.9)
> 
> guest account = andrea
> map to guest = bad user
> ...
> [test]
> available = yes
> browsable = yes
> guest ok = yes
> nfs4: acedup = merge
> nfs4: mode = special
> path = /var/tmp/test
> read only = no
> 
> and the shared directory /var/tmp/test has the following permission
> (so user andrea is the owner):
> 
> # ls -ld /var/tmp/test/
> drwx------   5 andrea   root           5 Oct 16 11:05 /var/tmp/test/
> 
> The client can mount the share as anonymous (user urca doesn't exist) 
> but can't read or write:
> 
> root@andrea-virtual-machine:~# mount -t cifs //node1/test /mnt2 -o 
> username=urca,domain=hyperfile.local
> Password for urca@//node1/test:
> 
> root@andrea-virtual-machine:~# cd /mnt2
> 
> root@andrea-virtual-machine:/mnt2# df -h .
> Filesystem      Size  Used Avail Use% Mounted on
> //node1/test    4,2T  2,1T  2,2T  49% /mnt2
> 
> root@andrea-virtual-machine:/mnt2# touch pippo
> touch: cannot touch 'pippo': Permission denied
> root@andrea-virtual-machine:/mnt2# ls
> ls: reading directory '.': Permission denied
> 
> am I misunderstanding something about Samba anonymous access?
> 

Yes ;-)

You are trying to use a known user as a guest user, try reading this:

https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server

Rowland



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