Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login script with net use

Status
Not open for further replies.

bp1169

IS-IT--Management
Mar 23, 2001
97
0
0
US
I am trying to write a logon script that will access a drive on a remote server using the net use command. More background: Anonymous users log onto a NT Terminal server (local acct)and needs access to a share on a domain server. I wrote in the net use \\server\share /user:domain\username however the script hangs because it wants a password to make the connection. I know there is a password option under net use but its boggling my mind as the context doesn't write the password in correctly, has anyone done something similar? Any help is appreciated.
 
The share on the domain server should be shared to the everyone group rather than domain users. That should do the trick.
 
That's what I thought too. It did not work. Something quirky which is happening though is when I logged onto the terminal server as that non-domain account and browse network neighborhood I get the popup window asking who to connect as. I type in the valid domain user and password and viola it connects. I go to the command prompt type the net use string using the valid domain acct and the password and it pops up with the connect as box, this time the password is not valid.
 
Let's troubleshoot this...obviously the share, the permissions, the domain account and pw are correct, because in a WIN32 environment, it all works, right ? (ie. You can do this from Network Neighborhood)

From a DOS environment, it doesn't work... So what are the differences in the DOS env. vs the WIN32 env. ?

Are you sure you are typing the command in correctly ? Network Neighborhood pulls up an "automated" box, are you typing in
domainname\useraccount or just
useraccount ??

Are there spaces in these names? Is the sharename too long ? Do you need "quotes" for this command ?

are you typing:
net use x: \\servername\sharename /user:domain\username password (all in one line)

Are you typing it like the above exactly ?

How about from
START >> RUN

You should be able to type in the same dos line in START >> RUN and it should connect...

What share level permissions are on that share? Is that domain account added to that share ?'

Is there an issue with NTFS permissions that are separate from the share level permissions ?

Just some ideas...

Dean!
 
I remember running into a login problem (relating to DOS) and the problem was what
Dean said about long names.
Instead of /CompanyDataFiles use /Compan~1 (or whatever you see as the directory
name from a DOS prompt.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top