Computing.Net > Forums > Windows 2000 > :: Need help with Login Script ::

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

:: Need help with Login Script ::

Reply to Message Icon

Name: Rosco
Date: September 11, 2002 at 06:41:34 Pacific
OS: Win 2000
CPU/Ram: P4 1.6GHz/256MB SDRAM
Comment:

I've written a simple login script batch file and have one problem and one question - Here's the script:

---------------
cls
@echo off
echo Authenticating %USERNAME% with %LOGONSERVER% on %USERDOMAIN%
echo Welcome %USERNAME%

echo Removing existing shares/network drives...
@echo off
if exist S: net use S: /d
if exist H: net use H: /d

echo Now mapping network drives...
@echo off
net use S: \\svrVCG\SHARED
net use H: \\svrVCG\F$\%username%

echo Login completed, have a nice day

pause

exit
---------------

Now as you've probably already figured out the login script should map the S: drive to a shared directory available to everybody and the H: drive should be mapped to the user's home directory.

The login script runs and maps the first drive successfully but I always get the following:

"The password is invalid for \\svrVCG\F$\testuser" (testuser is the username and name of user's home directory)
"Type the password for \\svrVCG\F$\testuser"

I then type in the users password but get:

"System error 5 has occured"

Why is this? Shouldn't the user be authenticated upon login and given access to their own directory, of which they have full control?

Can some kind person please advise me on this?

Also just out of interest, the script runs in a minimised command line prompt window... is there any way I can ensure that it is visible and normal size (or even maximised) so that the user can see any and all echo messages?

Thanks in advance

Rosco




Sponsored Link
Ads by Google

Response Number 1
Name: Mike
Date: September 11, 2002 at 08:46:22 Pacific
Reply:

net use...

net use doesn't pass the login password to allow access to shared resources unless it is used in the command line. (Type 'net help use' to see use of this command.) You may need to specify a different share for each folder shared and a non-variable share in the command line for net use. This could make your login-script quite long. However, if you do succeed with using separate shares and not changing your command line, then good on you.


0

Response Number 2
Name: vivah8t
Date: September 11, 2002 at 10:56:54 Pacific
Reply:

The command I prefer to use to map the user's home folder is:

net use h: /home

I'm not sure why you are getting an error as I've used simple scripts like yours to map drives at logon without problems. Only thing I can suggest, which you've probably done, is to check the share permissions and file permissions for the folder, and verify the home directory path in the user's account.


0

Response Number 3
Name: Marcus
Date: September 12, 2002 at 03:27:10 Pacific
Reply:

I see your connecting to a hidden share - F$

net use H: \\svrVCG\F$\%username%

Is this a hidden share you've created or is it the default admin share created when windows is setup ?

If it's the default admin share than your users will not be able access it unless they have admin rights.

Dunno if it significant or not

Marcus


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: :: Need help with Login Script ::

Need help with Batch script. www.computing.net/answers/windows-2000/need-help-with-batch-script/50848.html

Need Help With Server Setup!!!! WILL PA www.computing.net/answers/windows-2000/need-help-with-server-setup-will-pa/21809.html

Help with Login Scripts www.computing.net/answers/windows-2000/help-with-login-scripts/33900.html