locked
SMB Share and Granting Permissions RRS feed

  • Question

  • I am able to create a new share on the current insider build. However, I am unable to grant access to other local accounts. Is the version of Net in IOT Core fully featured? I would like to host an anonymous SMB share for software updates. Any help would be greatly appreciated.

    Wednesday, September 30, 2015 8:15 PM

Answers

  • You can do this from Powershell or SSH using the "net" command and the "icacls" command.

    e.g.

    mkdir share

    net share myshare=c:\share

    icacls c:\share /grant Everyone:F

    This series of command would create a share that is accessible anonymously at \\<YOUR PI's IP ADDRESS>\myshare 

    Hope this helps,

    Ben

    More info here:

    https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/file_srv_command_line.mspx?mfr=true

    https://technet.microsoft.com/en-us/library/cc753525.aspx

    Thursday, October 1, 2015 11:55 PM
  • From the Unofficial FAQ over on the raspberry site

    13. Map the USB drive on my Pi so that I can see it from my Desktop

    From Power Shell or SSH

    Code: Select all
    net share e$=e: /GRANT:EVERYONE`,CHANGE /REMARK:"USB Drive"




    14. See that drive I have now mapped (and the C: drive as well :-))

    On the Desktop use File Explorer. Enter

    Code: Select all
    \\{PiNameOrIpAddress}\e$

    and logon with Pi Admin Username and Password (for c: use c$)

    https://ms-iot.github.io/content/en-US/win10/samples/SMB.htm
    IOTGirl EDIT - This link has been renamed:

    https://developer.microsoft.com/en-us/windows/iot/docs/windowsfilesharing

    15. Use those shares as logical drives from my Desktop

    Use File Explorer and Map Network Drive. Enter the same details as above.

    Remember to use 192.168.xx.yy\Adminstrator  and password to set the domain correctly to the Pi


    riclh



    Wednesday, December 16, 2015 2:28 AM

All replies

  • You can do this from Powershell or SSH using the "net" command and the "icacls" command.

    e.g.

    mkdir share

    net share myshare=c:\share

    icacls c:\share /grant Everyone:F

    This series of command would create a share that is accessible anonymously at \\<YOUR PI's IP ADDRESS>\myshare 

    Hope this helps,

    Ben

    More info here:

    https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/file_srv_command_line.mspx?mfr=true

    https://technet.microsoft.com/en-us/library/cc753525.aspx

    Thursday, October 1, 2015 11:55 PM
  • Ok, so I did all of the above things, but when I try to map the drive, I get a prompt for credentials.  When I put in admin and password, it bounces back stating that my password is incorrect, which it is not.  Tried guest as well, but no dice.  Also unable to open network share from windows IOT core watcher.

    Any way to make this work?

    Tuesday, December 15, 2015 10:13 PM
  • From the Unofficial FAQ over on the raspberry site

    13. Map the USB drive on my Pi so that I can see it from my Desktop

    From Power Shell or SSH

    Code: Select all
    net share e$=e: /GRANT:EVERYONE`,CHANGE /REMARK:"USB Drive"




    14. See that drive I have now mapped (and the C: drive as well :-))

    On the Desktop use File Explorer. Enter

    Code: Select all
    \\{PiNameOrIpAddress}\e$

    and logon with Pi Admin Username and Password (for c: use c$)

    https://ms-iot.github.io/content/en-US/win10/samples/SMB.htm
    IOTGirl EDIT - This link has been renamed:

    https://developer.microsoft.com/en-us/windows/iot/docs/windowsfilesharing

    15. Use those shares as logical drives from my Desktop

    Use File Explorer and Map Network Drive. Enter the same details as above.

    Remember to use 192.168.xx.yy\Adminstrator  and password to set the domain correctly to the Pi


    riclh



    Wednesday, December 16, 2015 2:28 AM
  • Hi,

    I try to get access to a local SMB on my network, the server have a public access with C#.

    I tried to create a Network Credential, also I mapped my SMB on a Drive with powershell ( I can access via powershell), share the mapped drive but every time I get  a no access error.. 

    Can you help me? (I 'm new with UWP, I had more experience in Winforms.)

    Exception:

    WinRT information: Cannot access the specified file or folder (M:\Shared Videos). The item is not in a location that the application has access to (including application data folders, folders that are accessible via capabilities, and persisted items in the StorageApplicationPermissions lists). Verify that the file is not marked with system or hidden file attributes.

    Code :

    NetworkCredential theNetworkCredential = new NetworkCredential(@"192.168.2.51\Guest", ""); CredentialCache theNetCache = new CredentialCache(); theNetCache.Add(new Uri(@"\\192.168.2.18\Public"), "Basic", theNetworkCredential);

    //Same error when I use the Admin account (of Windows IoT and server) StorageFolder externalDevices = Windows.Storage.KnownFolders.RemovableDevices; Windows.Storage.StorageFolder folder = await StorageFolder.GetFolderFromPathAsync(@"M:\Shared Videos");



    Tuesday, January 10, 2017 1:06 AM
  • Hi Nic_rf,

    I have merged your question into an existing topic on IoT Core and SMB.  Note from the previous response that there is a sample regarding SMB so please do also check out WindowsOndevice.com for helpful documentation and samples.

    Sincerely,

    IoTGirl

    Tuesday, January 10, 2017 8:09 PM
  • @Nic_rf please can you confirm you try to access a network share from a network resource from your pi?

    (as it seems this topic discuss the opposite)


    Tuesday, January 10, 2017 8:20 PM
  • @cyberh0me No, I tried to access to a file from SMB server on my local network with the pi.


    Sunday, January 15, 2017 10:16 PM
  • so IoTGirl should split that topic as it was merged with the wrong one...
    Tuesday, January 17, 2017 9:04 PM
  • Hi Cyberh0me and Nic_rf,

    The concept should be the same.  The SMB share, no matter where it resides, will need to have permissions that allow the Windows Device to access it. 

    Sincerely,

    IoTGirl

    Tuesday, January 17, 2017 9:43 PM
  • @IoTGirl

    its a huge difference if the pi is the file server or the client as both scenarios require different settings and tools

    to handle everything in one topic is only confusing and absolutely not helpful

    for example its easy to find samples to access a file on pi from a different host

    file <pi> network <host> app

    this works and is well documented and should work

    BUT

    the forum is full of not working issues if the pi try to access a file hosted on a different system

    i can replicate that issue every time and think i will open a topic for that

    br
    Andre

    Tuesday, January 17, 2017 10:39 PM
  • Hi Andre,

    Please do open another issue with clear repro steps and I can get it routed to the correct reviewer.

    Sincere thanks,

    IoTGirl

    Wednesday, January 18, 2017 12:31 AM