[Samba] smbclient help

Robert Marcano robert at marcanoonline.com
Tue Jan 12 15:52:59 UTC 2021

On 1/12/21 8:46 AM, jmpatagonia via samba wrote:
> Hello we have a samba 4 AD --> Version 4.11.13-Debian
> We have a netlogon share
> [netlogon]
>          browseable = no
>          read list = "+MIDOMINIO\Domain Users"
>          path = /etc/samba/netlogon
>          comment = Script de logueo en la red
>          valid users = "+MIDOMINIO\Domain Users"
>          public = yes
>          writeable = no
>  From a user logged on domain, we need access to the share "netlogon" from
> command line "smbclient or similar" without introducing user or password,
> just direct. like from file navigator smb://domain-server2/netlogon
> And finally and the second time copy a file from the share netlogon to a
> client folder.
> Regards.

You can try with Kerberos (-k), but that will require a proper Kerberos 
enable user session", or doing kinit before it.

If ehat you are trying is to script these actions, take a look at 
smbclient documentation:

            This option allows you to specify a file from which to read 
the username and password used in the connection. The format of the file is

                username = <value>
                password = <value>
                domain   = <value>

            Make certain that the permissions on the file restrict 
access from unwanted users.

More information about the samba mailing list