login script to map to Users home directory

T

Tony

I want to be able to map a drive to each users home directory when loggin in

\\server\share\%username%

How can this be done?
 
G

Guest

There is a user account attribute for the home dir path.
put the syntax you wrote below in, and it will map automatically on logon.
 
P

Pegasus \(MVP\)

Tony said:
I want to be able to map a drive to each users home directory when loggin in

\\server\share\%username%

How can this be done?

Place this instruction into your logon script:

net use P: \\server\share\%username%
 
S

Steve Duff [MVP]

1) Create a batch file named "logon.bat" in the \\server\netlogon share.

2) Put the statement "net use U: \\server\share\%username% /persistent:no /yes" in that batch file. (Omit the quotes. Replace "U:"
and \\server\share with your actual values of course.)

3) Make sure the security on this batch file is everyone-read.

4) Open a user's AD profile, and put LOGON.BAT in the login script field. Do NOT include a path or it will not work.

That's it. You should be able to see the script window briefly when you login as that user. It doesn't matter if you name a "home
directory" or not in the user profile.

You can do this with group policy, but it is a bit trickier and more trouble than you really need at this point.

Steve Duff, MCSE, MVP
Ergodic Systems, Inc.
 
D

David H. Lipman

First create the account. Such as 'lipman'.
Create a hidden share such as 'lipman$' that points to the directory...

\\server\users\lipman

Choose the script interpreter of your choice. I prefer, and champion, Kixtart
(https://kixtart.org Kixtart is CareWare)

use P: /delete
DELKEY("HKEY_CURRENT_USER\Network\Persistent\P")
use P: \\server\%username%$

Dave




| I want to be able to map a drive to each users home directory when loggin in
|
| \\server\share\%username%
|
| How can this be done?
|
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top