Run Login Script for Users Group with GP

  • Thread starter Thread starter David Reed
  • Start date Start date
D

David Reed

Hello,

I have a login script for a specific group of users. It's a very simple
script like this:

e o: /delete
net usnet use o: \\server\share

I want to create a Group Policy that I can apply to a Users Group and have
all those users map this share as their "O:" drive.

Can anyone tell me how to do this?

David
 
David,
This is a general approach to creating the group policy. The actual
mechanics will differ depending on whether or not you are using GPMC (group
policy management console) to setup group policy. I would recommend using
GPMC if you are not familiar with group policy as it will make more sense.

1) First determine where the group of users are located in terms of the
containers the users have been put in. If they are scattered or in the
users container, then it would make sense to create a group policy object
(GPO) at the domain level and then use security filtering to cause the
policy to apply only to that user group. If the users can all be moved to
an OU, then the group policy object can be created and linked to the actual
OU.

2) After creating the GPO, then you will edit the policy and add a scripts
setting. If you are pointing to the script on a share, then you should use
a UNC path for that script. The easiest way to setup a script policy is to
add the script to the scripts share for the sysvol (which can be done by
opening the script policy and click on view scripts then copy the script to
that folder at that point). Then you should be able to browse to the script
to add it as a script policy setting.

3) As mentioned in step 1 if you are adding this policy to a higher level
container like the domain level and only want it to apply to a smaller group
of users, then user security filtering to have it apply to just that group.
Remember to remove authenticated users from the list of groups that will
have the policy applied to.

HTH,
Judith
 
Hi Judith,

Does the GPMC only work on Win2k3 Servers?

I thought I read that it wouldn't work on Win2k Servers and Win2k Clients
(and AD).

Thanks,

David
 
You could create a script that will check the user for group membership and
based on that it will run the script.

Here is an example using two batch files...

Content of IfMember.bat

@echo off

set $Member=N

if {%2}=={} goto :EOF

net user %1 /domain | find /i %2 >nul

if not errorlevel 1 set $Member=Y



Content of script.bat

call IfMember "%userName%" "Accounting"

if "%$Member%" EQU "Y" goto Accounting

if "%$Member%" EQU "N" goto user



:Accounting

net use i: \\server\accounting

net use g: \\server\share1

net use r: \\server\share2

net use h: \\server\share3

goto end



:user

echo.You're not a member of accounting

net use g: \\server\share1

net use r: \\server\share2

net use h: \\server\share3

goto end



:end
 
You can manage a Win2k doamin with GPMC if you have a Win XP Professional
machine with SP1, plus an additional SP1 Hotfix and .NET framework.

You are correct, GPMC will not install on Win2K nor Win2K clients.

Joe G. [MSFT]
"This posting is provide "AS IS" with no warranites, and confers no rights
 
Okay, that's what I thought. I don't have any WinXP clients of any kind in
our facility.

Thanks!

David

Joe Gettys said:
You can manage a Win2k doamin with GPMC if you have a Win XP Professional
machine with SP1, plus an additional SP1 Hotfix and .NET framework.

You are correct, GPMC will not install on Win2K nor Win2K clients.

Joe G. [MSFT]
"This posting is provide "AS IS" with no warranites, and confers no rights


David Reed said:
Hi Judith,

Does the GPMC only work on Win2k3 Servers?

I thought I read that it wouldn't work on Win2k Servers and Win2k Clients
(and AD).

Thanks,

David
moved
to should
use is
to script
to and
have
 

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

Back
Top