Connect to share on local machine using non-primary name

  • Thread starter Thread starter Vizoere
  • Start date Start date
V

Vizoere

Hi, I'm having a problem on a Windows 2003 server as well as an XP Pro machine.

If I try to connect to a local share using the computer name, things work as
expected.
C:\>net use \\mycomputername\c$
The command completed successfully.

If I try connecting using a different name, it says my username password is
wrong. Although my real issue is with a different name set up in dns, for
testing purposes, I added a line to the hosts file.
C:\>net use \\othername\c$
The password or user name is invalid for \\othername\c$.

Enter the password for 'MYDOMAIN\MYUSERNAME' to connect to 'othername':

Pinging othername is successful and shows my correct IP address.

I've tried googling this but had a hard time coming up with a search string
that brought back anything useful. Am I missing something, or is there a reg
key I could change to make this work?

Thanks for any thoughts/suggestions.
 
Vizoere said:
Hi, I'm having a problem on a Windows 2003 server as well as an XP Pro
machine.

If I try to connect to a local share using the computer name, things work
as
expected.
C:\>net use \\mycomputername\c$
The command completed successfully.

If I try connecting using a different name, it says my username password
is
wrong. Although my real issue is with a different name set up in dns, for
testing purposes, I added a line to the hosts file.
C:\>net use \\othername\c$
The password or user name is invalid for \\othername\c$.

Enter the password for 'MYDOMAIN\MYUSERNAME' to connect to 'othername':

Pinging othername is successful and shows my correct IP address.

I've tried googling this but had a hard time coming up with a search
string
that brought back anything useful. Am I missing something, or is there a
reg
key I could change to make this work?

Using the Client for Microsoft Networking as you are doing,...you have to
use the *real* name of the machine.

DNS aliases work fine for web sites and SQL Databases,.... not for Windows
File Sharing with authentication.

Also with DNS Aliases (should be doing it with a CNAME) you need to fully
qualify the name \\othername.mydomain.loc ,....not \\othername


--
Phillip Windell
www.wandtv.com

The views expressed, are my own and not those of my employer, or Microsoft,
or anyone else associated with me, including my cats.
-----------------------------------------------------
 
Vizoere said:
Hi, I'm having a problem on a Windows 2003 server as well as an XP Pro
machine.

If I try to connect to a local share using the computer name, things work
as
expected.
C:\>net use \\mycomputername\c$
The command completed successfully.

If I try connecting using a different name, it says my username password
is
wrong. Although my real issue is with a different name set up in dns, for
testing purposes, I added a line to the hosts file.
C:\>net use \\othername\c$
The password or user name is invalid for \\othername\c$.

Enter the password for 'MYDOMAIN\MYUSERNAME' to connect to 'othername':

Pinging othername is successful and shows my correct IP address.

I've tried googling this but had a hard time coming up with a search
string
that brought back anything useful. Am I missing something, or is there a
reg
key I could change to make this work?

Thanks for any thoughts/suggestions.

The message means exactly what it says: Your current user name / password is
not known on \\othername. You must either enter a user name / password that
is known on \\othername or else establish an account on \\othername that
matches your current logon account.
 
Thanks Phillip. Do you know of any way to make this work with the alternate
name? The purpose behind this is to write a script to pull a "gateway"
server name from a service running on the local server. That gateway may or
may not be the same as the server the script is running on. It also will
probably never be the primary machine name of the gateway. The script then
needs to copy a file to one of the IIS folders on the gateway so it's
accesible from the web. I don't have access to add/change any dns records.
It looks like I could add some more code to ping the name and extract the IP
address from the output, but that workaround seems messy.

Any other thoughts?
Thanks,
 
Thanks Pegasus. In this case, "mycomputername" and "othername" are referring
to the same machine. It works when using the primary machine name but not a
dns alias.
 
Vizoere said:
Thanks Phillip. Do you know of any way to make this work with the
alternate
name? The purpose behind this is to write a script to pull a "gateway"
server name from a service running on the local server. That gateway may
or
may not be the same as the server the script is running on. It also will
probably never be the primary machine name of the gateway. The script
then
needs to copy a file to one of the IIS folders on the gateway so it's
accesible from the web. I don't have access to add/change any dns
records.
It looks like I could add some more code to ping the name and extract the
IP
address from the output, but that workaround seems messy.

I don't even know what you are trying to descirbe.
The word "gateway" can mean a million different things.

--
Phillip Windell
www.wandtv.com

The views expressed, are my own and not those of my employer, or Microsoft,
or anyone else associated with me, including my cats.
-----------------------------------------------------
 
By gateway, I just mean another server that happens to be running IIS and is
the entry point into a web application for our users. I was trying to keep
things generic, as I know sometimes too many details fogs up the real issue.

Looking around on google some more, and remembering some server migration
stuff I've done in the past, I found some topics about netbios aliases, and
strictnamechecking. Experimentation with that did not solve my problem.

I'm wondering if it has something to do with how we log on here. We use
smartcards and a PIN and don't know our passwords, much less have to type
them anywhere.

Any other thoughts, I'd be glad to consider them but I'm thinking I may just
have to go with parsing the ping output.

Thanks again for your replies
 
Vizoere said:
By gateway, I just mean another server that happens to be running IIS and is
the entry point into a web application for our users. I was trying to keep
things generic, as I know sometimes too many details fogs up the real issue.

Looking around on google some more, and remembering some server migration
stuff I've done in the past, I found some topics about netbios aliases, and
strictnamechecking. Experimentation with that did not solve my problem.

I'm wondering if it has something to do with how we log on here. We use
smartcards and a PIN and don't know our passwords, much less have to type
them anywhere.

Any other thoughts, I'd be glad to consider them but I'm thinking I may just
have to go with parsing the ping output.

Thanks again for your replies

You just have to specify the username fully, with the real name of the
server, because as far as the server is concerned it's users belong to
/it/ not your alias. so:

C:\>net use x: \\aliasname\c$ {password} /user:\\realname\username

Alister
 
Thanks Alister. That might work if my user account was local to the box. I
tried using "/user:domain\username" but got the same result.
I broke down and wrote a little more code to find the IP address of the
server and using that, the connection works just fine.

"net use x: \\ipaddress\c$"

Thanks everyone for the suggestions!
 
Back
Top