General discussion

Locked

Login Script

By renaissance2000 ·
I need to know what a login script looks like for maqpped shared drives. This is what it looks like thus far: \\server_name\shared_folder_name\user_logon_name

I'm trying to create an automatic logon process. I've never written it before. Where do I create the file at???

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Joseph Moore In reply to Login Script

You are close.
Let's say you want to map drive L: to the SHARED folder on \\MACHINE1 but you want all users to connect to this share using the user account of BOB in the MYDOMAIN domain, instead of their own accounts. Well, you can't have everyone logging in as BOB; that would just make a mess of things!
So, your login script to do the above would look like this:

NET USE L: \\MACHINE1\SHARED /U:MYDOMAIN\BOB "password" /PERSISTENT:NO

You would put BOBs password without the quoatation marks.

So, that would do it.

Now, if you don't want to connect to the shared folder as BOB, you could leave out everthing from the /U switch to just have the currently logging in account use their own credentials to connect to the share:
NET USE L: \\MACHINE1\SHARED /PERSISTENT:NO


hope this helps

Collapse -

by jason In reply to Login Script

You also need to place the file in the netlogon share or sysvol share (which are the same) on a Domain Controller. You can name the file with .bat or .cmd extension.

Collapse -

by jhayesit In reply to Login Script

is this a domain? is so you can do it on the user account home folder.
something like this should do it.
\\share\%username%

Collapse -

by jhayesit In reply to Login Script

if you have it on logon script, you won't know who will logon, so replace the username with
%username% of course make sure that the shared folders are named with their usernames.

Back to Windows Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums