Drive Mapping Script

G

Guest

hi,

was wondering if anyone could help me with the following....

I have a login script (batch file) which everyone runs. Most people only
need access to 3 or 4 drives. We have a total of about 10 drives that are
mapped. The majority of people have access to about 3 drives and the other 7
are for managers etc. How can i write a login script which maps only drives
which the user has access to ?. I believe this would save a lot of overhead
as the typical user wouldn't need to have 10 drives mapped and have 7 of them
say access denied when they attempt to enter it. It would just not appear
as it wouldn't have been mapped in the first place.

Please help. A sample of how i map a drive is shown below.
I know i can program a different script for different groups of ppl but then
i have to set permissions/mapping in several places rather than one place.


NET USE G: /DELETE /YES
NET USE G: \\%MYSERVERNAME%\General

Thank you
 
P

Pegasus \(MVP\)

hi,

was wondering if anyone could help me with the following....

I have a login script (batch file) which everyone runs. Most people only
need access to 3 or 4 drives. We have a total of about 10 drives that are
mapped. The majority of people have access to about 3 drives and the other 7
are for managers etc. How can i write a login script which maps only drives
which the user has access to ?. I believe this would save a lot of overhead
as the typical user wouldn't need to have 10 drives mapped and have 7 of them
say access denied when they attempt to enter it. It would just not appear
as it wouldn't have been mapped in the first place.

Please help. A sample of how i map a drive is shown below.
I know i can program a different script for different groups of ppl but then
i have to set permissions/mapping in several places rather than one place.


NET USE G: /DELETE /YES
NET USE G: \\%MYSERVERNAME%\General

Thank you

There are several ways of achieving this. Here is one of them:

1. Create one folder for each user: \\YourServer\NetLogon\JSmith
2. Place the batch "user.bat" file inside that folder:
net use g: \\YourServer\General
net use p: \\YourServer\PSmith
net use s: \\YourServer\Finance
3. Modify your netlogon batch as follows:
@echo off
net use /persistent:no
net use k: \\YourServer\common
if exist \\YourServer\Netlogon\%UserName%\user.bat call
\\YourServer\Netlogon\%UserName%\user.bat

This allows you to tune every person's logon assigments as
per their specific requirements.

An alternative method would be to make the logon assigments
specific to the group(s) that the user belongs to. Do you have
any groups defined?

Yet another alternative, which I consider dirty, would be to
suppress all error messages in your current logon script:

NET USE G: \\%MYSERVERNAME%\General 1>nul 2>nul
 

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