Link to home
Start Free TrialLog in
Avatar of cbpee
cbpeeFlag for Australia

asked on

Is it possible to authenticate to a remote share by passing username and password in one line?

I am looking at a way to authenticate to a remote share on a windows box. The share is from a workgroup but I can make it a domain if it helps.

What I want to setup is something like    \\computer\share\  username@workgroup password

I am sure I have seen something where you can pas this information through, but it may have been on web pages only.
ASKER CERTIFIED SOLUTION
Avatar of LauraEHunterMVP
LauraEHunterMVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> "can easily sniff the packet and get the password used since it's passed in clear text"

Be careful with this statement - while the password may be -typed- in clear text on the user's console, how that password is transmitted across the wire depends on the environment, whether things like SMB signing are configured, and what level of NTLM authentication is supported.
Avatar of cbpee

ASKER

What Im looking to do I guess is to form a connection so that when we do open the share via \\computer\share we wont have to input the login details.

This is all done within a secure environemnt so no issues passing UN or Passwords.

So if the above does form a connection and thus passes information and when we make a normal windows share connectionit has already authenticated then great we wont have to re-input the UN or Password.
Yes, if you do the "net use" that I listed above, the next time you opened that UNC path it would not re-prompt for usernames/passwords.  As I listed the command above, these credentials would be stored until the machine rebooted.  You can also map an actual drive letter using the /persistent switch to force the connection to survive a reboot, but this connection would need to be manually deleted and re-created whenever the user's password changed.
Avatar of cbpee

ASKER

Many thanks guys, won big points with the boss over this one, it will save us entering on the logon information each day for 80+ servers.