{"id":13756611,"url":"https://github.com/adobe/node-smb-server","last_synced_at":"2025-05-10T03:32:40.996Z","repository":{"id":45470200,"uuid":"51529752","full_name":"adobe/node-smb-server","owner":"adobe","description":"A 100% JavaScript implementation of the SMB file sharing protocol.","archived":true,"fork":false,"pushed_at":"2021-06-22T15:20:12.000Z","size":32132,"stargazers_count":280,"open_issues_count":0,"forks_count":55,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-04-18T03:03:50.193Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adobe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-11T16:52:52.000Z","updated_at":"2024-12-03T13:26:21.000Z","dependencies_parsed_at":"2022-07-15T01:46:51.375Z","dependency_job_id":null,"html_url":"https://github.com/adobe/node-smb-server","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fnode-smb-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fnode-smb-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fnode-smb-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Fnode-smb-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adobe","download_url":"https://codeload.github.com/adobe/node-smb-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253358137,"owners_count":21895976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T11:00:48.857Z","updated_at":"2025-05-10T03:32:40.638Z","avatar_url":"https://github.com/adobe.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# SMB Server for Node.js\n\n**:warning: This repository is no longer actively maintained.**\n\n## Overwiew\n\n**node-smb-server** is an open-source JavaScript implementation of the [SMB/CIFS](https://en.wikipedia.org/wiki/Server_Message_Block#SMB_/_CIFS_/_SMB1) file sharing protocol.\n\nSome highlights:\n\n* pure JavaScript\n* fully configurable/customizable\n* extensible: allows to expose non-filesystem based data as a mountable file system via an abstract backend SPI (similar to Samba's VFS)\n\n\u003e **Note**:\n\u003e\n\u003e The current implementation works with **Finder** on **OS X** (Yosemite, El Capitan, Sierra). More recent OS X versions might work as well but they haven't been tested.\n\u003e\n\u003e**Windows** is not supported. **File Explorer** only supports the standard SMB port `445`. It's virtually impossible to run a custom SMB server listening on port `445` on Windows. See [here](https://github.com/adobe/node-smb-server/issues/3#issuecomment-349855169) and [here](https://github.com/adobe/node-smb-server/issues/6#issuecomment-304242562) for related discussions. \n\n\n\n\n## Installation\n\n```bash\nnpm install node-smb-server\n```\n\nor\n\n```bash\ngit clone https://github.com/adobe/node-smb-server.git\ncd node-smb-server\nnpm install\n```\n\n## Getting started\n\nExecute the following commands in a terminal:\n\n```bash\ncd \u003cnode-smb-server install dir\u003e\nnpm start\n```\n\nIn Finder, open the 'Connect to Server' dialog (⌘K) and enter the url `smb://localhost:8445/fs` (user: `test`, password: `test`).\n\n## Getting your hands dirty\n\n### User management\n\nThe following users are pre-configured: `test/test`, `admin/admin`, `guest/\u003cempty password\u003e`\n\nUsers can be edited in the `config.json` file:\n\n```json\n...\n\"users\" : {\n    \"test\" : {\n      \"lmHash\" : \"01fc5a6be7bc6929aad3b435b51404ee\",\n      \"ntlmHash\" : \"0cb6948805f797bf2a82807973b89537\"\n    },\n    \"admin\" : {\n      \"lmHash\" : \"f0d412bd764ffe81aad3b435b51404ee\",\n      \"ntlmHash\" : \"209c6174da490caeb422f3fa5a7ae634\"\n    },\n    \"guest\" : {\n      \"lmHash\" : \"aad3b435b51404eeaad3b435b51404ee\",\n      \"ntlmHash\" : \"31d6cfe0d16ae931b73c59d7e0c089c0\"\n    }\n  }\n...\n```\n\nPassword hashes can be computed by running:\n\n```bash\nnode createhash.js\n```\n\n### Share configuration\n\nShare configurations can be edited in the `config.json` file, e.g.:\n\n```json\n...\n \"shares\": {\n    \"FS\": {\n      \"backend\": \"fs\",\n      \"description\": \"fs-based test share\",\n      \"path\": \"./smbroot\"\n    },\n    \"JCR\": {\n      \"backend\": \"jcr\",\n      \"description\": \"AEM-based test share\",\n      \"host\": \"localhost\",\n      \"port\": 4502,\n      \"protocol\": \"http:\",\n      \"auth\": {\n        \"user\": \"\u003cuser\u003e\",\n        \"pass\": \"\u003cpwd\u003e\"\n      },\n      \"path\": \"/\",\n      \"maxSockets\": 64,\n      \"contentCacheTTL\": 30000,\n      \"binCacheTTL\": 600000\n    },\n...\n```\n\n### Developing a custom backend\n\nConsider the following example use case:\n\n*You would like to enable your desktop applications to access data and documents stored in a RDBMS or a Cloud-based service.*\n\nYou could write a custom backend by implementing the `Share`, `Tree` and `File` interfaces of the virtual backend SPI (`lib/spi`). Check out the existing implementations (`lib/backends`) to get an idea.  \n\n## Current Status\n\n* Implements **CIFS** and **MS-SMB 1.0**.\n* Support for **SMB2** is currently work in progress.\n* Supports **LM**, **LMv2**, **NTLM**, **NTLMSSP** authentication protocols\n* Supported backends:\n  * local file system (`lib/backends/fs`)\n  * [JCR](http://jackrabbit.apache.org/jcr/jcr-api.html) (`lib/backends/jcr`)\n  * [AEM Assets](https://helpx.adobe.com/experience-manager/6-3/assets/using/mac-api-assets.html) (`lib/backends/dam`)\n* Tested with Finder on OS X (Yosemite, El Capitan, Sierra).\n\n## ToDo's\n\n* Test with other clients on other platforms (Windows, Linux).\n* Test cases/suite\n\n### **CIFS/SMB**\n\n* missing `NT_TRANSACT` subcommands\n* missing `TRANSACTION` subcommands\n* missing `TRANSACTION2` subcommand information levels\n* missing CIFS commands:\n  * `TRANSACTION_SECONDARY`\n  * `TRANSACTION2_SECONDARY`\n  * `NT_TRANSACT_SECONDARY`\n  * `OPEN_PRINT_FILE`\n* support for named streams?\n* SMB Signing?\n* proper implementation of `LOCKING_ANDX`?\n\n### **SMB Versions 2 and 3**\n\nCheck/Implement the following protocol extensions/versions:\n\n* [SMB v2](https://en.wikipedia.org/wiki/Server_Message_Block#SMB_2.0)\n* [SMB v3](https://en.wikipedia.org/wiki/Server_Message_Block#SMB_3.0)\n\n## Specifications\n\n* [MS-CIFS: Common Internet File System (CIFS) Protocol](https://msdn.microsoft.com/en-us/library/ee442092.aspx)\n* [MS-SMB: Server Message Block (SMB) Protocol](https://msdn.microsoft.com/en-us/library/cc246231.aspx)\n* [MS-SMB2: Server Message Block (SMB) Protocol Versions 2 and 3](https://msdn.microsoft.com/en-us/library/cc246482.aspx)\n\n## Contributing\n\nIf you are interested in contributing to this project, check out our [contribution guidelines](CONTRIBUTING.md)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadobe%2Fnode-smb-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadobe%2Fnode-smb-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadobe%2Fnode-smb-server/lists"}