SMBCLIENT(1) User Commands SMBCLIENT(1) (NAME) smbclient - ftp SMB/CIFS (SYNOPSIS) smbclient [-M|--message=HOST] [-I|--ip-address=IP] [-E|--stderr] [-L|--list=HOST] [-T|--tar=IXFvgbNan] [-D|--directory=DIR] [-b|--send-buffer=BYTES] [-t|--timeout=SECONDS] [-p|--port=PORT] [-g|--grepable] [-q|--quiet] [-B|--browse] [-?|--help] [--usage] [-d|--debuglevel=DEBUGLEVEL] [--debug-stdout] [-s|--configfile=CONFIGFILE] [--option=name=value] [-l|--log-basename=LOGFILEBASE] [--leak-report] [--leak-report-full] [-R|--name-resolve=NAME-RESOLVE-ORDER] [-O|--socket-options=SOCKETOPTIONS] [-m|--max-protocol=MAXPROTOCOL] [-n|--netbiosname=NETBIOSNAME] [--netbios-scope=SCOPE] [-W|--workgroup=WORKGROUP] [--realm=REALM] [-U|--user=[DOMAIN/]USERNAME%[PASSWORD]] [-N|--no-pass] [--password=STRING] [--pw-nt-hash] [-A|--authentication-file=FILE] [-P|--machine-pass] [--simple-bind-dn=DN] [--use-kerberos=desired|required|off] [--use-krb5-ccache=CCACHE] [--use-winbind-ccache] [--client-protection=sign|encrypt|off] [-V|--version] [-c|--command=STRING] (DESCRIPTION) samba(7) . smbclient SMB/CIFS <<>> . ftp ( ftp(1)) . . (OPTIONS) servicename servicename . : //server/service server NetBIOS SMB/CIFS service . "printer" SMB/CIFS "smbserver" servicename : //smbserver/printer IP (DNS) ! NetBIOS IP . -R|--name-resolve smbclient name resolve order smb.conf(5) . password . -N ( ) . . ( -U ( )) -N . ( ENTER .) : ( OS/2 Windows for Workgroups) . . . -M|--message NetBIOS name "WinPopup" . ^D (control-D) . WinPopup . WinPopup . . smbclient . : smbclient -M FRED < mymessage.txt mymessage.txt FRED . -U -I FROM TO . WinPopup Samba message command smb.conf(5) . : WfWg WinPopup startup . -p|--port port () TCP . () TCP SMB/CIFS . -g|--grepable -L grep cut . -m|--max-protocol protocol SMB smbclient . SMB3 . SMB2 SMB1 SMB2 NT1 . Windows 2012 max-protocol SMB3 . -P|--machine-pass (machine account) . -I|--ip-address IP-address IP address . "a.b.c.d" . SMB/CIFS NetBIOS name resolve order . IP NetBIOS . . . -E|--stderr (stdout) (stderr) . - tty . -L|--list . smbclient -L host . -I NetBIOS TCP/IP DNS . -b|--send-buffer buffersize smbclient . ( ) (0xFFFF00) . smbclient (pipeline) . . iosize smbclient . -B|--browse SMB DNS. -t|--timeout (timeout) SMB . . . SMB3 smbclient . timeout smbclient . -T|--tar tar smbclient tar(1) SMB/CIFS . tar : o c - tar . tar (tape device) <<->> . tar (log level) -d0 . x . o n - c (dry run) . o x - () tar . -D tar . tar <<->> . c . (mtime) tar . . o I - . . ( ). . (globbing) . r . o X - . . . (globbing) . r . o F - . F tar ( ). . (globbing) . r . o b - (Blocksize). ( ) . tar blocksize*TBLOCK ( ) . o g - (Incremental). (archive bit) . c . o v - (Verbose). tar . tar . tarmode verbose . o r - (wildcard) . . o N - (Newer than). . tar . c . o a - (Set archive bit). . g c . Tar tar smbclient . . tar tar smbclient . Tar.sp DOS ( '\\' ) UNIX ( '/' ) . tar backup.tar myshare mypc ( ). smbclient //mypc/myshare "" -N -Tx backup.tar users/docs smbclient //mypc/myshare "" -N -TXx backup.tar users/docs tar users/docs. smbclient //mypc/myshare "" -N -Tc backup.tar users/docs tar DOS. smbclient //mypc/myshare "" -N -Tc backup.tar users\edocs tar tarlist. smbclient //mypc/myshare "" -N -TcF backup.tar tarlist tar . smbclient //mypc/myshare "" -N -Tc backup.tar * -D|--directory initial directory . tar -T . -c|--command command string command string - stdin . -N -c . stdin -c 'print -'. -?|--help . --usage . -d|--debuglevel=level level 0 10 . 1 . . 0 . 1 - . 1 . 3 . log level /etc/samba/smb.conf (override) . --debug-stdout STDOUT . STDERR . --configfile= . client smb encrypt . /etc/samba/smb.conf . . --option== smb.conf(5) <<>> <<>> . . --option=name=value . -l|--log-basename=logdirectory /. ".progname" ( log.smbclient log.smbd ). . --leak-report talloc . --leak-report-full talloc . -V|--version . -R|--name-resolve=NAME-RESOLVE-ORDER IP . . --name-resolve=NAME-RESOLVE-ORDER . : "lmhosts" "host" "wins" "bcast". : o lmhosts: IP Samba lmhosts. lmhosts NetBIOS ( lmhosts(5) ) . o host: IP /etc/hosts NIS DNS. IRIX Solaris /etc/nsswitch.conf . NetBIOS 0x20 () . o wins: IP wins server. WINS . o bcast: (broadcast) interfaces . . /etc/samba/smb.conf (name resolve order) ..sp lmhosts host wins bcast . name resolve order /etc/samba/smb.conf . -O|--socket-options=SOCKETOPTIONS TCP . socket options /etc/samba/smb.conf . -m|--max-protocol=MAXPROTOCOL ( ) . client max protocol /etc/samba/smb.conf . -n|--netbiosname=NETBIOSNAME NetBIOS Samba . netbios name /etc/samba/smb.conf . /etc/samba/smb.conf . --netbios-scope=SCOPE NetBIOS (NetBIOS scope) nmblookup NetBIOS . NetBIOS rfc1001.txt rfc1002.txt . NetBIOS NetBIOS . -W|--workgroup=WORKGROUP SMB . ( smb.conf ) . NetBIOS SAM ( Domain SAM) . workgroup /etc/samba/smb.conf . -r|--realm=REALM (realm) . realm /etc/samba/smb.conf . -U|--user=[DOMAIN\]USERNAME[%PASSWORD] SMB . PASSWORD% . USER ( % ) LOGNAME ( ) . Kerberos (Kerberos Credentials cache) . . . . -A . . Samba kinit . Samba ( ps ) (race condition) . -N|--no-pass . . . . --password . . Samba kinit . password-- PASSWD PASSWD_FD (FD) . PASSWD_FILE ( ) . . ! Samba ( ps ) (race condition) . --pw-nt-hash NT (NT hash) . -A|--authentication-file=filename . : username = password = domain = ! -P|--machine-pass . --simple-bind-dn=DN DN (simple bind). --use-kerberos=desired|required|off Samba Kerberos . Kerberos IP DNS . Samba Kerberos (ccache) . ccache U|--user- Kerberos (kinit) . Kerberos use-krb5-ccache-- . client use kerberos /etc/samba/smb.conf . --use-krb5-ccache=CCACHE (ccache) Kerberos . use-kerberos=required-- . --use-winbind-ccache winbind. --client-protection=sign|encrypt|off . client protection /etc/samba/smb.conf ..sp : --option=clientsmbencrypt=OPTION, --option=clientipcsigning=OPTION, --option=clientsigning=OPTION. (OPERATIONS) (prompt) : smb:\> ("\\") . . . (space) . (case-insensitive). . (double quotes) "a long file name". ( "[parameter]") . . ( "") . . . . ? [command] command ? . . ! [shell command] shell command ! (shell) . . allinfo file ( stream) . altname file <<>> ( 8.3) . archive . 0 1 2 (reset) 3 . 0 . backup <> (/ ). <> (true) SE_BACKUP SE_RESTORE . . blocksize blocksize tar . 20 . tar blocksize*TBLOCK ( 512 ) . cancel jobid0 [jobid1] ... [jobidN] (printjobs) . case_sensitive SMB . OFF ( ). Samba 3.0.5 case sensitive smb.conf auto . cd "directory name" . . . chmod file mode in octal CIFS UNIX . UNIX (octal) UNIX . chown file uid gid CIFS UNIX . UNIX . uid gid . CIFS UNIX . close open . Samba . del mask . deltree mask . recurse . . . dir mask . du (share) . echo SMBecho . Samba . exit . get [local file name] remote file name () . local file name . smbclient . lowercase . getfacl UNIX . POSIX ACL . hardlink Windows CIFS (hardlink) . help [command] ? . history . iosize smbclient . 0 ( ) 16776960 (0xFFFF00) . smbclient (pipeline) . . lcd [directory name] directory name . . . link target linkname CIFS UNIX . linkname target . linkname . listconnect DFS . lock CIFS UNIX . POSIX fcntl . Samba . logon vuid . vuid . vuid . Samba . logoff . Samba . lowercase get mget. (ON) get mget . ( ) MSDOS UNIX . ls dir . mask mget mput . mget mput (ON) () . mask . mget "source*" mask "*.c" (ON) mget "*.c" "source*" . mask ( "*") mask . . mget mput mask "*" . md mkdir . mget mask . mask - recurse mask . smbclient . lowercase . mkdir ( ) . more PAGER . mput mask . mask - recurse mask . smbclient . notify . filechangenotify . . (action numbers) https://msdn.microsoft.com/en-us/library/dn392331.aspx . . posix CIFS UNIX . POSIX / ( ) . posix_encrypt CIFS UNIX . SMB . smbclient kerberos (-k) kerberos (signing and sealing) GSSAPI . -e smbclient . Samba 3.2 . posix_open CIFS UNIX . CIFS UNIX fileid . Samba . posix_mkdir CIFS UNIX . CIFS UNIX (mode) . posix_rmdir CIFS UNIX . CIFS UNIX . posix_unlink CIFS UNIX . CIFS UNIX . posix_whoami WHOAMI CIFS UNIX. (guest) sid . print . prompt mget mput. (ON) . (OFF) . put [remote file name] local file name . remote file name . smbclient . lowercase . queue . quit exit . readlink symlinkname CIFS UNIX . "symlinkname" . rd rmdir . recurse mget mput. (ON) ( ) . mask . mask . (OFF) mget mput mask . rename [-f] old filename new filename. -f . NT1 SMB2 . rm mask . rmdir ( ). scopy . . setmode attrib DOS . : setmode myfile +r myfile . showconnect DFS . stat file CIFS UNIX extensions . (UNIX basic info level) stat . inode ( ) . (symlink fifo socket) . symlink target linkname CIFS UNIX extensions . (symbolic hard link) target linkname . linkname . . Samba . tar [IXbgNa] tar - -T . tarmode ( ). g () N () tarmode . <<->> tar x - . blocksize (Blocksize). ( ) . tar blocksize*TBLOCK ( ) . tarmode tar DOS . . ( ). ( full) tar archive . ( inc) tar archive . ( ). ( reset) tar archive ( / ). noreset . ( ). tar . nosystem . ( ). tar . nohidden . timeout (timeout) SMB . . . SMB3 smbclient . unlock CIFS UNIX extensions . POSIX fcntl . Samba . volume (volume) . vuid vuid . vuid . Samba . tcon (tree connect - ) . . tid ( tree id) . Samba . tdis ( tree disconnect). Samba . tid (tid) . tid . Samba . utimes < change time> . [YY]YY:MM:DD-HH:MM:SS -1 . ( ) . . -n . OS/2 LanManager NetBIOS . LANMAN2 smbclient . (ENVIRONMENT VARIABLES) --user --password . (INSTALLATION) . . smbclient /usr/local/samba/bin/ /usr/samba/bin/ root . . setuid setgid ! . SMB/CIFS . smbd(8) - ( 1024) . (DIAGNOSTICS) . . . 3 . (VERSION) 4.24.6 Samba . (AUTHOR) Samba Andrew Tridgell . Samba Samba Team Linux . Samba 4.24.6 08/16/2026 SMBCLIENT(1)