diff --git a/index.js b/index.js index a84967f..018a9ee 100644 --- a/index.js +++ b/index.js @@ -15,6 +15,7 @@ function SambaClient(options) { this.address = options.address; this.username = wrap(options.username || 'guest'); this.password = options.password ? wrap(options.password) : undefined; + this.domain = options.domain; } SambaClient.prototype.getFile = function(path, destination, cb) { @@ -84,6 +85,11 @@ SambaClient.prototype.getSmbClientArgs = function(fullCmd) { args.push(this.password); } + if (this.domain) { + args.push('-W'); + args.push(this.domain); + } + return args; };