jmpatagonia
2021-Feb-04 08:57 UTC
[Samba] help to get file from public share without authenticating
Is still not working
smbclient //10.11.37.62/netlogon -c 'get logon_linux.sh' -N
-U\\jcbatman1
Anonymous login successful
Domain=[POLICIA2] OS=[] Server=[]
tree connect failed: NT_STATUS_ACCESS_DENIED
smb.conf
[netlogon]
browseable = no
read list = "+POLICIA2\Domain Users"
path = /etc/samba/netlogon
comment = Script de logueo en la red
valid users = "+POLICIA2\Domain Users"
public = yes
writeable = no
El mar, 2 feb 2021 a las 16:58, Rowland penny via samba (<
samba at lists.samba.org>) escribi?:
> On 02/02/2021 12:11, jmpatagonia via samba wrote:
> > Hello I need to help to copy file from a public share to the client,
> with a
> > user just logon on samba 4 AD domain server.
> >
> > I try this, but dont work
> > smbclient //10.11.37.62/netlogon -N -g -c 'get
logon_linux.sh'
> > Anonymous login successful
> > Domain=[POLICIA2] OS=[] Server=[]
> > tree connect failed: NT_STATUS_ACCESS_DENIED
> >
> > I need something like this, without authenticating
> > smbclient //10.11.37.62/netlogon
> > Enter jcbatman1's password:
> > Domain=[POLICIA2] OS=[] Server=[]
> > smb: \> get logon_linux.sh
> > getting file \logon_linux.sh of size 1466 as logon_linux.sh (204,5
> > KiloBytes/sec) (average 204,5 KiloBytes/sec)
> > smb: \>
> >
> > The user is correctly logged on the domain server.
> > The share netlogon is public share.
> >
> > Regards.
>
> Try this:
>
> smbclient //raspberrypi/public -c 'get logon_linux.sh' -N
-U\\rowland
>
> Where 'raspberrypi' is the servers name.
>
> Rowland
>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
Rowland penny
2021-Feb-04 12:13 UTC
[Samba] help to get file from public share without authenticating
On 04/02/2021 08:57, jmpatagonia via samba wrote:> Is still not working > > smbclient //10.11.37.62/netlogon -c 'get logon_linux.sh' -N -U\\jcbatman1 > Anonymous login successful > Domain=[POLICIA2] OS=[] Server=[] > tree connect failed: NT_STATUS_ACCESS_DENIED > > smb.conf > > [netlogon] > browseable = no > read list = "+POLICIA2\Domain Users" > path = /etc/samba/netlogon > comment = Script de logueo en la red > valid users = "+POLICIA2\Domain Users" > public = yes > writeable = noOK, it works for myself: rowland at devstation:~$ smbclient //raspberrypi/public -c 'get logon_linux.sh' -N -U\\rowland getting file \logon_linux.sh of size 35 as logon_linux.sh (2.1 KiloBytes/sec) (average 2.1 KiloBytes/sec) pi at raspberrypi:~ $ cat /etc/samba/smb.conf [global] ??? ........... ??? map to guest = bad user ??? ........... [public] ??? path = /home/freeshare ??? read only = no ??? guest ok = yes There is a big error with your share, you cannot use 'valid users' with 'public = yes' (which is a synonym for 'guest ok'), Whatever user is attempting to access the share, the user is authenticated before it gets anywhere the share. This means that a guest user is mapped to 'nobody' and 'nobody' isn't a member of the 'Domain Users' group. Try removing the 'read list' & 'valid users' lines from your share. Rowland