Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how can i password protect a specific shared folder and all the sub-folder/contents in it?

The PC which I want to password protect the folder is running Windows XP. My Workgroup are all using Windows XP except for one Windows 7.

This is an Example

If they open this they will be able to view it:

\\Folder Main\

But if they open this folder:

\\\Folder Main\Folder B\

if will ask for a Password or Windows Account/Password

I know it can be done for Windows 7 shared folder but i'm not sure about windows XP, Can it be Done? Thanks

share|improve this question

Yes, you can.

Right-click that folder, click Properties, go to the Security tab, and add an entry for the users that you want to block access for that denies read access.

share|improve this answer
That is for windows 7, I want to do it for windows XP. – Jeremy John Nov 16 '12 at 13:50
@JeremyJohn: This should work on Windows XP too. (although I'm not sure about XP Home). You may need to disable simple sharing in Folder Options. – SLaks Nov 16 '12 at 14:10
There is no Security tab under Properties, just General and Sharing tab. I'm using XP Professional BTW. – Jeremy John Nov 16 '12 at 22:05

Smb not work like that. If you connect to share, it'll connect with permissions of your windows account or with those you'll provide instead. But you can't use multiple account simultaneously to connect to one share.

If you'll connect to \server\share\ and try to acces \server\share\private, then you'll get access denied.

You can however connect explicitely under user you want by Adding a network share drive in "Your comuter" and selecting "login as another user".

share|improve this answer

You can set Windows Account/Password for a specific shared folder and all the sub-folder/contents in it, but can't set folder password for this, unless you use the third program, such as kakasoft shared folder protection. It can set folder Password for a specific shared folder inclduing the sub-folder/contents in it.

share|improve this answer

I found a (somewhat hackish) method, which consists of the following steps:

  1. Enable Advanced Sharing in XP.
  2. Create a special user account that will be used only for accessing this one Shared Folder - for example MyUser, and give it the necessary permissions. The user account is local to the computer where the Shared Folder is, not to the computer from which you'll be connecting. Also assign a password to that user, for example MyPassword.
  3. On the computer you'll be connecting from, create a Network Mapped Drive using this command:

    net use Z: \\\MySharedFolder MyPassword /user:MyUser

    Replace with the IP of the computer hosting the shared folder. Note that you need to use the IP address instead of the hostname, or it might fail with this error:

    System error 1219 has occurred.

    Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .