Share using command line
On lightweighted editions of Windows XP you may encounter a problem when trying to share folders. When opening the sharing dialog (not using simple file sharing here) and browsing for suitable user(s) you may find that no users are listed at all. Only groups are listed. A workaround for this is to add shared users using the SubInACL command, found on Microsofts homepage: http://www.microsoft.com/en-us/download/details.aspx?id=23510 Download and run it. It will install to: C:\Program Files\Windows Resource Kits\Tools (or C:\Program\Windows Resource Kits\Tools in Swedish XP:s) As this path is not in the PATH variable you will need to add it to use the command globally in the system. 1. Right click on My computer -> Properties. 2. Advanced-tab -> Environment variables 3. Choose either System variables or User variables box. 4. Scroll down to PATH in the desired box, click on it, then click Edit button. 5. Add the path above to the variable value field, prefixed by ; to separate if there are more there. For example, if the original value was C:\test then you do C:\test;C:\Program Files\Windows Resource Kits\Tools . 6. Click OK until all dialogs are closed. You may now use subinacl globally, to test: 1. Open a command line dialog (Start -> Run -> write cmd and push enter). 2. Type subinacl to test, you should get the version of the command and some more details. You may also add msvcirt.dll to the C:\Windows\System32 folder. This can be copied from a "normal" Windows XP installation. Now share a folder in the system, graphically (normal way) or using NET SHARE command, more about this here: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_share.mspx?mfr=true If sharing graphically, then just share it with "everyone" for start. Then type the following in a command line dialog (like the one opened a few steps above): subinacl /share \\computername\sharename /grant=user=f Replace computername with the name of the computer on the network. Replace sharename with the name of the share. NOTE: not the folder name here - the SHARE name on the network - outside, may be the same. Replace user with the name of the user or (group) that should get the access. Replace f (or let it be) with the desired permission, you may choose between the following: F : Full Control R : Read C : Change (Read more about subinacl here: http://www.robvanderwoude.com/subinacl.php) For example: subinacl /share \\lisapc\pictures /grant=leif=f Verify graphically that it has been shared correctly, or using a Linux machine with smbclient installed: smbclient -L <ip-of-windows-machine> -U <username allowed to access share>
This is a personal note. Last updated: 2013-10-25 15:04:51.