1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
'\" t
.\" Title: smbget
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 02/21/2015
.\" Manual: User Commands
.\" Source: Samba 4.0
.\" Language: English
.\"
.TH "SMBGET" "1" "02/21/2015" "Samba 4\&.0" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
smbget \- wget\-like utility for download files over SMB
.SH "SYNOPSIS"
.HP \w'\ 'u
smbget [\-a,\ \-\-guest] [\-r,\ \-\-resume] [\-R,\ \-\-recursive] [\-u,\ \-\-username=STRING] [\-p,\ \-\-password=STRING] [\-w,\ \-\-workgroup=STRING] [\-n,\ \-\-nonprompt] [\-d,\ \-\-debuglevel=INT] [\-D,\ \-\-dots] [\-P,\ \-\-keep\-permissions] [\-o,\ \-\-outputfile] [\-f,\ \-\-rcfile] [\-q,\ \-\-quiet] [\-v,\ \-\-verbose] [\-b,\ \-\-blocksize] [\-O,\ \-\-stdout] [\-U,\ \-\-update] [\-?,\ \-\-help] [\-\-usage] {smb://host/share/path/to/file} [smb://url2/] [\&.\&.\&.]
.SH "DESCRIPTION"
.PP
This tool is part of the
\fBsamba\fR(7)
suite\&.
.PP
smbget is a simple utility with wget\-like semantics, that can download files from SMB servers\&. You can specify the files you would like to download on the command\-line\&.
.PP
The files should be in the smb\-URL standard, e\&.g\&. use smb://host/share/file for the UNC path
\fI\e\e\e\eHOST\e\eSHARE\e\efile\fR\&.
.SH "OPTIONS"
.PP
\-a, \-\-guest
.RS 4
Work as user guest
.RE
.PP
\-r, \-\-resume
.RS 4
Automatically resume aborted files
.RE
.PP
\-R, \-\-recursive
.RS 4
Recursively download files
.RE
.PP
\-u, \-\-username=STRING
.RS 4
Username to use
.RE
.PP
\-p, \-\-password=STRING
.RS 4
Password to use
.RE
.PP
\-w, \-\-workgroup=STRING
.RS 4
Workgroup to use (optional)
.RE
.PP
\-n, \-\-nonprompt
.RS 4
Don\*(Aqt ask anything (non\-interactive)
.RE
.PP
\-d, \-\-debuglevel=INT
.RS 4
Debuglevel to use
.RE
.PP
\-D, \-\-dots
.RS 4
Show dots as progress indication
.RE
.PP
\-P, \-\-keep\-permissions
.RS 4
Set same permissions on local file as are set on remote file\&.
.RE
.PP
\-o, \-\-outputfile
.RS 4
Write the file that is being downloaded to the specified file\&. Can not be used together with \-R\&.
.RE
.PP
\-O, \-\-stdout
.RS 4
Write the file that is being downloaded to standard output\&.
.RE
.PP
\-f, \-\-rcfile
.RS 4
Use specified rcfile\&. This will be loaded in the order it was specified \- e\&.g\&. if you specify any options before this one, they might get overridden by the contents of the rcfile\&.
.RE
.PP
\-q, \-\-quiet
.RS 4
Be quiet
.RE
.PP
\-v, \-\-verbose
.RS 4
Be verbose
.RE
.PP
\-b, \-\-blocksize
.RS 4
Number of bytes to download in a block\&. Defaults to 64000\&.
.RE
.PP
\-?, \-\-help
.RS 4
Show help message
.RE
.PP
\-\-usage
.RS 4
Display brief usage message
.RE
.PP
\-U, \-\-update
.RS 4
Download only when remote file is newer than local file or local file is missing\&.
.RE
.PP
\-e|\-\-encrypt
.RS 4
This command line parameter requires the remote server support the UNIX extensions or that the SMB3 protocol has been selected\&. Requests that the connection be encrypted\&. Negotiates SMB encryption using either SMB3 or POSIX extensions via GSSAPI\&. Uses the given credentials for the encryption negotiation (either kerberos or NTLMv1/v2 if given domain/username/password triple\&. Fails the connection if encryption cannot be negotiated\&.
.RE
.SH "SMB URLS"
.PP
SMB URL\*(Aqs should be specified in the following format:
.PP
.if n \{\
.RS 4
.\}
.nf
smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]]
.fi
.if n \{\
.RE
.\}
.PP
.if n \{\
.RS 4
.\}
.nf
smb:// means all the workgroups
.fi
.if n \{\
.RE
.\}
.PP
.if n \{\
.RS 4
.\}
.nf
smb://name/ means, if \fIname\fR is a workgroup, all the servers in this workgroup, or if \fIname\fR is a server, all the shares on this server\&.
.fi
.if n \{\
.RE
.\}
.SH "EXAMPLES"
.sp
.if n \{\
.RS 4
.\}
.nf
# Recursively download \*(Aqsrc\*(Aq directory
smbget \-R smb://rhonwyn/jelmer/src
# Download FreeBSD ISO and enable resuming
smbget \-r smb://rhonwyn/isos/FreeBSD5\&.1\&.iso
# Recursively download all ISOs
smbget \-Rr smb://rhonwyn/isos
# Backup my data on rhonwyn
smbget \-Rr smb://rhonwyn/
.fi
.if n \{\
.RE
.\}
.SH "BUGS"
.PP
Permission denied is returned in some cases where the cause of the error is unknown (such as an illegally formatted smb:// url or trying to get a directory without \-R turned on)\&.
.SH "VERSION"
.PP
This man page is correct for version 3 of the Samba suite\&.
.SH "AUTHOR"
.PP
The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
.PP
The smbget manpage was written by Jelmer Vernooij\&.
|