Windows Connection Credentials from Linux

198 views
Skip to first unread message

Grant MacDonald

unread,
Jun 2, 2017, 1:13:37 PM6/2/17
to nodejs
Hi folks.  I have a node.js application that runs on a Linux server that needs access to files on a Windows file share.  The user account for the node.js application on the Linux server does not have credentials to traverse the directory tree of this Windows file share (ie. using the fs module.)  Is there a way that I can specify valid Windows credentials (username/password) in a node.js application so that it can access this Windows share using fs, fs-extra, etc?  

Thanks. Grant.

Denard Springle

unread,
Jun 3, 2017, 2:47:21 PM6/3/17
to nodejs
Mount the Windows share from Linux (http://www.techrepublic.com/article/how-to-permanently-mount-a-windows-share-on-linux/) and use the local mount point in Node.

HTH

-- Denny

Simon Doodkin

unread,
Jun 3, 2017, 2:47:21 PM6/3/17
to nodejs
things like this are done in Linux using the mount command
windows file sharing 
are called Samba on Linux
there is samba server client
probably there is user space( in the kernel )
plugin for file system mount for this.
you can download for your linux 
...using apt or yum

the authentication is NTLM I think it is also Kerberos 

you can connect to a samba server using a client library not only a file system

so you need to support NTLM authentication may be also Kerberos authentication
and have a client for Samba server.

look here:
https://www.google.co.il/search?q=samba+client+nodejs&hl=en-us



בתאריך יום שישי, 2 ביוני 2017 בשעה 20:13:37 UTC+3, מאת Grant MacDonald:

Grant MacDonald

unread,
Jun 4, 2017, 6:31:44 PM6/4/17
to nodejs
Hi guys.  I appreciate the responses.  I am familiar with windows share mounts within Linux.  I was hoping to make the connection from within the node application.  I will add the permanent mount to the server and proceed this way.

Thanks. Grant.

Simon Doodkin

unread,
Jun 5, 2017, 2:59:41 PM6/5/17
to nod...@googlegroups.com
I meant you can look at this
https://www.npmjs.com/package/smb2

not sure when but sometimes network file systems are too slow for the concurrent web - just be aware if bottle neck situation did not happen...


--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/92tYYIci2ao/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nodejs+unsubscribe@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/b387f11f-9f54-479e-a7dc-88be6df1fcda%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Grant MacDonald

unread,
Jun 5, 2017, 5:30:15 PM6/5/17
to nodejs
Hi Simon.  I tried this module last week but it doesn't seem to support SMB version 3 (file server is Windows Server 2012.)

I managed to get it to work with the mounting of the share at boot time.  That will work for what I need now.  

I'll keep my eye out for a SMB module that supports version 3.

Thanks. Grant.


On Monday, June 5, 2017 at 3:59:41 PM UTC-3, Simon Doodkin wrote:
I meant you can look at this
https://www.npmjs.com/package/smb2

not sure when but sometimes network file systems are too slow for the concurrent web - just be aware if bottle neck situation did not happen...

On 4 June 2017 at 17:01, Grant MacDonald <grant.raymo...@gmail.com> wrote:
Hi guys.  I appreciate the responses.  I am familiar with windows share mounts within Linux.  I was hoping to make the connection from within the node application.  I will add the permanent mount to the server and proceed this way.

Thanks. Grant.

On Saturday, June 3, 2017 at 3:47:21 PM UTC-3, Denard Springle wrote:
Mount the Windows share from Linux (http://www.techrepublic.com/article/how-to-permanently-mount-a-windows-share-on-linux/) and use the local mount point in Node.

HTH

-- Denny

On Friday, June 2, 2017 at 1:13:37 PM UTC-4, Grant MacDonald wrote:
Hi folks.  I have a node.js application that runs on a Linux server that needs access to files on a Windows file share.  The user account for the node.js application on the Linux server does not have credentials to traverse the directory tree of this Windows file share (ie. using the fs module.)  Is there a way that I can specify valid Windows credentials (username/password) in a node.js application so that it can access this Windows share using fs, fs-extra, etc?  

Thanks. Grant.

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/92tYYIci2ao/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nodejs+un...@googlegroups.com.

To post to this group, send email to nod...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages