github.com/artpar/rclone@v1.67.3/docs/content/smb.md (about) 1 --- 2 title: "SMB / CIFS" 3 description: "Rclone docs for SMB backend" 4 versionIntroduced: "v1.60" 5 --- 6 7 # {{< icon "fa fa-server" >}} SMB 8 9 SMB is [a communication protocol to share files over network](https://en.wikipedia.org/wiki/Server_Message_Block). 10 11 This relies on [go-smb2 library](https://github.com/hirochachacha/go-smb2/) for communication with SMB protocol. 12 13 Paths are specified as `remote:sharename` (or `remote:` for the `lsd` 14 command.) You may put subdirectories in too, e.g. `remote:item/path/to/dir`. 15 16 ## Notes 17 18 The first path segment must be the name of the share, which you entered when you started to share on Windows. On smbd, it's the section title in `smb.conf` (usually in `/etc/samba/`) file. 19 You can find shares by querying the root if you're unsure (e.g. `rclone lsd remote:`). 20 21 You can't access to the shared printers from rclone, obviously. 22 23 You can't use Anonymous access for logging in. You have to use the `guest` user with an empty password instead. 24 The rclone client tries to avoid 8.3 names when uploading files by encoding trailing spaces and periods. 25 Alternatively, [the local backend](/local/#paths-on-windows) on Windows can access SMB servers using UNC paths, by `\\server\share`. This doesn't apply to non-Windows OSes, such as Linux and macOS. 26 27 ## Configuration 28 29 Here is an example of making a SMB configuration. 30 31 First run 32 33 rclone config 34 35 This will guide you through an interactive setup process. 36 37 ``` 38 No remotes found, make a new one? 39 n) New remote 40 s) Set configuration password 41 q) Quit config 42 n/s/q> n 43 name> remote 44 Option Storage. 45 Type of storage to configure. 46 Choose a number from below, or type in your own value. 47 XX / SMB / CIFS 48 \ (smb) 49 Storage> smb 50 51 Option host. 52 Samba hostname to connect to. 53 E.g. "example.com". 54 Enter a value. 55 host> localhost 56 57 Option user. 58 Samba username. 59 Enter a string value. Press Enter for the default (lesmi). 60 user> guest 61 62 Option port. 63 Samba port number. 64 Enter a signed integer. Press Enter for the default (445). 65 port> 66 67 Option pass. 68 Samba password. 69 Choose an alternative below. Press Enter for the default (n). 70 y) Yes, type in my own password 71 g) Generate random password 72 n) No, leave this optional password blank (default) 73 y/g/n> g 74 Password strength in bits. 75 64 is just about memorable 76 128 is secure 77 1024 is the maximum 78 Bits> 64 79 Your password is: XXXX 80 Use this password? Please note that an obscured version of this 81 password (and not the password itself) will be stored under your 82 configuration file, so keep this generated password in a safe place. 83 y) Yes (default) 84 n) No 85 y/n> y 86 87 Option domain. 88 Domain name for NTLM authentication. 89 Enter a string value. Press Enter for the default (WORKGROUP). 90 domain> 91 92 Edit advanced config? 93 y) Yes 94 n) No (default) 95 y/n> n 96 97 Configuration complete. 98 Options: 99 - type: samba 100 - host: localhost 101 - user: guest 102 - pass: *** ENCRYPTED *** 103 Keep this "remote" remote? 104 y) Yes this is OK (default) 105 e) Edit this remote 106 d) Delete this remote 107 y/e/d> d 108 ``` 109 110 {{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/smb/smb.go then run make backenddocs" >}} 111 ### Standard options 112 113 Here are the Standard options specific to smb (SMB / CIFS). 114 115 #### --smb-host 116 117 SMB server hostname to connect to. 118 119 E.g. "example.com". 120 121 Properties: 122 123 - Config: host 124 - Env Var: RCLONE_SMB_HOST 125 - Type: string 126 - Required: true 127 128 #### --smb-user 129 130 SMB username. 131 132 Properties: 133 134 - Config: user 135 - Env Var: RCLONE_SMB_USER 136 - Type: string 137 - Default: "$USER" 138 139 #### --smb-port 140 141 SMB port number. 142 143 Properties: 144 145 - Config: port 146 - Env Var: RCLONE_SMB_PORT 147 - Type: int 148 - Default: 445 149 150 #### --smb-pass 151 152 SMB password. 153 154 **NB** Input to this must be obscured - see [rclone obscure](/commands/rclone_obscure/). 155 156 Properties: 157 158 - Config: pass 159 - Env Var: RCLONE_SMB_PASS 160 - Type: string 161 - Required: false 162 163 #### --smb-domain 164 165 Domain name for NTLM authentication. 166 167 Properties: 168 169 - Config: domain 170 - Env Var: RCLONE_SMB_DOMAIN 171 - Type: string 172 - Default: "WORKGROUP" 173 174 #### --smb-spn 175 176 Service principal name. 177 178 Rclone presents this name to the server. Some servers use this as further 179 authentication, and it often needs to be set for clusters. For example: 180 181 cifs/remotehost:1020 182 183 Leave blank if not sure. 184 185 186 Properties: 187 188 - Config: spn 189 - Env Var: RCLONE_SMB_SPN 190 - Type: string 191 - Required: false 192 193 ### Advanced options 194 195 Here are the Advanced options specific to smb (SMB / CIFS). 196 197 #### --smb-idle-timeout 198 199 Max time before closing idle connections. 200 201 If no connections have been returned to the connection pool in the time 202 given, rclone will empty the connection pool. 203 204 Set to 0 to keep connections indefinitely. 205 206 207 Properties: 208 209 - Config: idle_timeout 210 - Env Var: RCLONE_SMB_IDLE_TIMEOUT 211 - Type: Duration 212 - Default: 1m0s 213 214 #### --smb-hide-special-share 215 216 Hide special shares (e.g. print$) which users aren't supposed to access. 217 218 Properties: 219 220 - Config: hide_special_share 221 - Env Var: RCLONE_SMB_HIDE_SPECIAL_SHARE 222 - Type: bool 223 - Default: true 224 225 #### --smb-case-insensitive 226 227 Whether the server is configured to be case-insensitive. 228 229 Always true on Windows shares. 230 231 Properties: 232 233 - Config: case_insensitive 234 - Env Var: RCLONE_SMB_CASE_INSENSITIVE 235 - Type: bool 236 - Default: true 237 238 #### --smb-encoding 239 240 The encoding for the backend. 241 242 See the [encoding section in the overview](/overview/#encoding) for more info. 243 244 Properties: 245 246 - Config: encoding 247 - Env Var: RCLONE_SMB_ENCODING 248 - Type: Encoding 249 - Default: Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot 250 251 #### --smb-description 252 253 Description of the remote 254 255 Properties: 256 257 - Config: description 258 - Env Var: RCLONE_SMB_DESCRIPTION 259 - Type: string 260 - Required: false 261 262 {{< rem autogenerated options stop >}}