Entering UNC paths does not prompt for username/password

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
ksarnelli
Posts: 154
Joined: 13 Dec 2014 04:48

Entering UNC paths does not prompt for username/password

Post by ksarnelli »

Since I've been seeing a lot of threads lately about people not being able to access password protected network paths I figured I would chime in. I've never been able to connect to most password protected network shares unless I first try to access them in Windows Explorer (which does prompt me).

I've tried the suggestions in all of the other threads with no success.


Notable items:
- I have Network Server Caching disabled in Features
- If I save the credentials in Windows Credential Manager XY can connect without any problems, but for security reasons I cannot do this on most shares.
- I only connect to network shares by entering UNC paths directly in the address bar.
- The issue *does* happen with a fresh install.


The error I get is:
Could not find: \\server_or_ip\share
Probably the server is currently not available.


If i use:

Code: Select all

logon "\\server_or_ip\share";
XY does prompt me for credentials and then I am able to access the share.


I have attached a screenshot of:

Code: Select all

exist "\\server_or_ip\share";
when the error occurs.

Thanks!
To see the attached files, you need to log into the forum.

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Entering UNC paths does not prompt for username/password

Post by admin »

The number 53 means "Path not found". It should be number 5 ("Path found but access denied") to pop the login prompt.

Please try this line (with your path, of course) to see if XY can pop a login prompt for the path:

Code: Select all

logon "\\server\share";

ksarnelli
Posts: 154
Joined: 13 Dec 2014 04:48

Re: Entering UNC paths does not prompt for username/password

Post by ksarnelli »

admin wrote:The number 53 means "Path not found". It should be number 5 ("Path found but access denied") to pop the login prompt.
I guess that's the problem then :P

The path definitely exists, but requires authentication. Windows Explorer prompts for authentication and the XY logon command does as well.

ksarnelli
Posts: 154
Joined: 13 Dec 2014 04:48

Re: Entering UNC paths does not prompt for username/password

Post by ksarnelli »

admin wrote:The number 53 means "Path not found". It should be number 5 ("Path found but access denied") to pop the login prompt.

Please try this line (with your path, of course) to see if XY can pop a login prompt for the path:

Code: Select all

logon "\\server\share";
Did that already, see my original post :)

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Entering UNC paths does not prompt for username/password

Post by admin »

ksarnelli wrote:
admin wrote:The number 53 means "Path not found". It should be number 5 ("Path found but access denied") to pop the login prompt.

Please try this line (with your path, of course) to see if XY can pop a login prompt for the path:

Code: Select all

logon "\\server\share";
Did that already, see my original post :)
Oh, are you clever! :tup:

Well, what to do now? Should I also pop the login prompt on 53??? Hmmm... :eh:

ksarnelli
Posts: 154
Joined: 13 Dec 2014 04:48

Re: Entering UNC paths does not prompt for username/password

Post by ksarnelli »

Not sure if this will help but here is the

Code: Select all

exist "\\server_or_ip\share";
using the same UNC path after logging in with WE (or logon "\\server_or_ip\share"; from XY).
To see the attached files, you need to log into the forum.

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Entering UNC paths does not prompt for username/password

Post by highend »

A login prompt for a path that doesn't exist (at least that's what the return value says)? *doh*
One of my scripts helped you out? Please donate via Paypal

ksarnelli
Posts: 154
Joined: 13 Dec 2014 04:48

Re: Entering UNC paths does not prompt for username/password

Post by ksarnelli »

highend wrote:A login prompt for a path that doesn't exist (at least that's what the return value says)? *doh*
Actually, I believe that's essentially what WE does when you attempt to access a share on an online server that restricts share enumeration to authenticated users. It prompts you and then tells that the share/folder does not exist once you successfully authenticate, since it has no way of knowing before it is authenticated.

The trick is to only prompt the user in the above condition.

ksarnelli
Posts: 154
Joined: 13 Dec 2014 04:48

Re: Entering UNC paths does not prompt for username/password

Post by ksarnelli »

ksarnelli wrote:
highend wrote:A login prompt for a path that doesn't exist (at least that's what the return value says)? *doh*
Actually, I believe that's essentially what WE does when you attempt to access a share on an online server that restricts share enumeration to authenticated users. It prompts you and then tells that the share/folder does not exist once you successfully authenticate, since it has no way of knowing before it is authenticated.

The trick is to only prompt the user in the above condition.

I just tested the above scenario in WE with a non-existent share on one of these servers and it did in fact work exactly like that:

- Enter \\server\non_existent_share in address bar in WE
- Got prompted for username/password
- Entered credentials
- Got error from WE: "Windows cannot access \\server\non_existent_share "

On the next try with the same path ( \\server\non_existent_share) it generates the error right away since the credentials are cached.

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Entering UNC paths does not prompt for username/password

Post by admin »

OK, thanks for digging into the logic of this. I will add 53 support experimentally.

ksarnelli
Posts: 154
Joined: 13 Dec 2014 04:48

Re: Entering UNC paths does not prompt for username/password

Post by ksarnelli »

admin wrote:OK, thanks for digging into the logic of this. I will add 53 support experimentally.
I tested a few scenarios and the changes in 16.00.0109 are actually working great so far. I'll let you know if any issues come up. Thanks Don! :mrgreen:

Post Reply