Share via


Manage Network Share with Different Credentials

Question

Monday, December 10, 2018 7:30 PM

I have the following use-case:

I have all my pictures on a Networked Attached Storage (NAS) that supports Windows Sharing. I use Adobe Lightroom to manage my pictures. I want to map a network drive to a drive letter using either READONLY-ACCESS credentials or FULL-ACCESS credentials. When I am simply editing pictures, I want it to be read-only. If I need to add or delete files, then I need full access.

What is the best way for me to quickly switch between sessions using different credentials while keeping the same network share letter.

I have been searching the internet for quite some time and have been trying it out and nothing seems to be working. I can't even seem to disconnect from the network share, even after literally clicking "Disconnect" from the network share. I don't even know how to disconnect from a network share in such a way that Windows will ask me for the password again.

I am using Windows 10 Home and Pro (two computers) and would like a solution that involves me either clicking desktop shortcuts like "Connect READONLY" and "Connect FULL ACCESS".

Thanks.

All replies (11)

Sunday, December 16, 2018 1:04 AM ✅Answered

Momominta-- now we're getting somewhere.

The following works, even though its convoluted:

  1. Connect to a network share
  2. Open Windows Credentials and delete the corresponding Windows Credentials
  3. Open Services and "Restart" the Workstation service (and Computer Browser)
  4. Connect to the network share again

And it NOW prompts to enter the credentials!

Now I need to figure out how to specific Windows Credentials and restart the Workstation + Computer Browser services from a script.

(By the way Momominta, I didn't follow your instructions since you literally said to reboot after each step and then said that I didn't need to reboot my computer.)

Thank you very much Momominta for delivering the missing piece-- rebooting the Workstation/Computer Browser services.


Tuesday, December 11, 2018 6:49 AM

Hi ,

Thanks for your question.

Have you tried to map two network drive with the same trace, and then set them with different access.

For example, drive A has readonly-access and drive B have full-access, if you just want to edit pictures you can open drive A, if you want to add or delete files ,just open drive B.

Please feel free to let me know if you need any assistance.

Best Regards,

Eric

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, December 13, 2018 2:53 AM

Yes, I had tried that already.

I get a "The network folder specified is currently mapped using a different user name and password. To connect using a different user name and password, first disconnect any existing mapping to this network share."

Have you ever done what you suggested?

Also, while we are on the topic, how exactly do I "first disconnect any existing mapping to this network share"? Because clicking on "Disconnect" on the network drive and then attempting to Map Network Drive with different credentials results in the same error I typed above.

Also, if I simply go to the network share path that was mapped by the now disconnected mount, results in direct access without any credentials being requested. So fundamentally, the network share is still active and not disconnected.


Thursday, December 13, 2018 7:06 AM

Hi,

Thanks for your reply.

According to your description, do you means that you want the picture to be read-only when you edit picture? But you need full access because you also need to add/delete files.

If so, why not just set the permission of picture as read only?

Best Regards,

Eric

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Friday, December 14, 2018 3:33 AM

Editing a picture in Lightroom does not edit the source file, it only creates metadata within the Lightroom Catalog which resides on my local computer, not the network share.

Lightroom also supports flagging pictures for deletion, so when you decide, you can ask Lightroom to delete the source files.

So I need READ ONLY access sometimes, and I need FULL ACCESS other times, but I need them to still be mounted on the same drive.

Here is the way I do it now:

  1. Mount M:\ with read only credentials
  2. Use Lightroom to "develop pictures" and "flag them"
  3. Go to "Windows Credentials" within the Credentials Manager in Windows
  4. Edit and Save the credentials stored for the network share to the FULL ACCESS credentials
  5. REBOOT
  6. Use Lightroom to delete pictures

What I don't understand is why I need to reboot? How can I properly disconnect from the session and reconnect with alternate credentials?


Friday, December 14, 2018 3:34 AM

Momominta,

I'm not using Windows to share, I'm using a Synology NAS.

I don't see how your response is useful-- what am I missing?


Saturday, December 15, 2018 1:22 AM

Momominta, you are not being very helpful.

I am using Windows 10 to access a network share.

Are you even reading what my problem is? I want to...

Login to a network share with ONE set of credentials and then WITHOUT REBOOTING login to the same network share with DIFFERENT credentials.

Can you provide me with the steps to do that?


Saturday, December 15, 2018 1:24 AM

Here are some similar posts that also have never been resolved:

https://social.technet.microsoft.com/Forums/en-US/19641dd1-c584-4a2b-ae64-9a52a9952254/how-to-remove-cached-username-password-when-connecting-to-a-shared-folder-?forum=itproxpsp#19641dd1-c584-4a2b-ae64-9a52a9952254

https://social.technet.microsoft.com/Forums/windows/en-US/30b67ce3-f9eb-4b36-9862-768ece8f8f44/is-there-a-way-to-connect-a-share-using-a-different-username-when-already-connected?forum=win10itpronetworking#fcaabb98-26ab-421c-b932-910b5f3777fd


Sunday, December 16, 2018 1:34 AM

O seguinte funciona, apesar da confusão:

Conecte-se a um compartilhamento de rede
Abra as Credenciais do Windows e exclua as Credenciais do Windows correspondentes
Abra os Serviços e "Reinicie" o serviço Estação de Trabalho (e o Navegador do Computador)
Conecte-se ao compartilhamento de rede novamente
E agora peça para inserir as credenciais !

Agora preciso descobrir como especificar credenciais do Windows específicas e reiniciar os serviços do Workstation + Computer Browser a partir de um script.

(By the way, Momominta, eu não segui suas instruções desde que você literalmente disse para reiniciar após cada etapa e, em seguida, disse que eu não precisava reiniciar meu computador.)

Muito obrigado Momominta por entregar a parte que falta - reiniciando a estação de trabalho / computador Serviços do navegador.


Sunday, December 16, 2018 1:39 AM

Here is my powershell script that works if you run it as an admin:

run.ps1:

cmdkey /list | ForEach-Object{if($_ -like "*Target:*" -and $_ -like "*blackbox*"){cmdkey /del:($_ -replace " ","" -replace "Target:","")}} 

Restart-Service -Force -Name LanmanWorkstation

powershell shortcut (with Run as admin):

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -noprofile -executionpolicy bypass -file C:\path\run.ps1


Tuesday, December 18, 2018 3:36 AM

Happy that I have a "solution" yes.

Am I happy that Microsoft makes this so damn hard? No.

There is literally a "Disconnect" option for every Mapped Network Share, so go figure why this wouldn't ACTUALLY DISCONNECT you.