Discussion Locked

login script

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'm trying to use a login script to map drives, based on membership to a group. I'm using active directory. So a sample group would be "Accounting" in an OU called "Finance". What's the proper syntax for this, and could i do the same for printers? (using kix32). I really need a way to auto install printers based on OU or group membership. thanks.

9 replies

by cportman

Add a login script to the Finance OU

To map network drive

net use M: \\server\drive

As far as printers if you put the printers in the ou they will show up from win2k pro machines when someone adds a new printer then says its on the network- then says to search active directory. I am not sure how to script it.

Good Luck
cp

by corky132

Geez.. even I knew that.. We have about 100 OU's and I really dont want to maintain 100 different login scripts.

by umbral-echo

You need to set up Group Policy objects for the OUs that load the different logon scripts. One GPO is all you need for each different logon script.

1. To create a GPO you need to right-click a the domain icon or OU in the tree (Active Directory Users and Computers) and choose Properties. The Group Policy tab is used to create new GPO (Hit New). Highlight the new policy and then hit the "Edit" button. You'll have to look around in there but eventually you will come across the Logon and Logoff scripts under the "User Configuration" settings. Add the desired script to this interface.

2. Once you have created a GPO for EACH different Logon script you need to go back to the Group Policy tab. This time, highlight the Group Policy object and then hit the "Properties" button. You should see a "Security" tab that looks like NTFS permissions. First, remove the "Authenticated Users" group from the list of groups. Add the group you want the policy to apply to and look at the bottom box. The last permission in the list is "Apply Policy". Check this box and the policy will be applied only to members of that group.

* Note that the GPO is going to apply to the Site, Domain, or OU that it was created on. With the number of OUs in your domain I would suggest creating each GPO on the domain. This way the script will run for the user based on group membership, regardless of where in Active Directory it is created.

If you put a different set of mapped drives in each script, they will end up with different mapped drives based on the groups they are a member of.

by gussss

By using KIX32 you made things easy for you already, basically all you have to do is create a group in your active directory,(in this case we're going to call "marketing")(and lets say that we need to map to main server\testfolder and mainserver\playfolder), add all the users you want to this group, then edit your login script with the following command:

if Ingroup("marketing")
use p: \\mainserver\testfolder
use q: \\mainserver\playfolder
endif

Wish you luck and let me know if it works

This discussion is closed to new replies.