Solved

File sharing and drive mapping in with Active Directory

Posted on 2010-11-09
3
520 Views
Last Modified: 2012-06-27
I am trying to figure out how to set up a file server in a Windows environment. I have only worked with Netware and ConsoleOne up until this point.

Here's what I have done so far. Can someone tell me if I have done something that is not best practice.

I created a folder on the D: drive of the server called "data". I shared this folder and gave domain users read, Read & Execute, and list folder contents. Then I created some folders in data (IT and All) for testing purposes. I assigned a few groups to these folders with full control. Then I went into a subfolder and removed inherited permissions and only allowed domain admins (this is the folder where my switch and firewall configs will be).

Finally I created the following login script. I know how to apply the login script to everyone in the domain. How do I go about only applying a login script to a group? IS there anything that I did that's not best practice?

' PCALogin.vbs
' Created by Brandon Bogle
' Version 0.1 - NOvember 9th, 2010
' -----------------------------------------------------------------'
Option Explicit
Dim objNetwork, strRemotePath1, strRemotePath2
Dim strDriveLetter1, strDriveLetter2

strDriveLetter1 = "S:"
strDriveLetter2 = "R:"
strRemotePath1 = "\\Park05\data\IT"
strRemotePath2 = "\\Park05\data\All"

Set objNetwork = CreateObject("WScript.Network")

' Section which maps two drives, S: and R:
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2

' Extra code just to add a message box
WScript.Echo "Map drives " & strDriveLetter1 & " & " & strDriveLetter2

Wscript.Quit

' End of Windows Logon Script Example
0
Comment
Question by:bbogle2007
3 Comments
 
LVL 10

Expert Comment

by:moon_blue69
ID: 34097616
i am not sure about the best practice. You can put the user or groups in a an organisation unit and apply the gp to that OU
0
 
LVL 5

Expert Comment

by:OrcaKnight
ID: 34098295
There is a utility called 'ifmember.exe' supplied by Microsoft that you can use in any standard script. It will allow you to evaluate a user based on group memberships and logically map them according to your needs.

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=07c2f6d7-815e-4fa0-9043-4e4635ccd417

EG:
*** User login script ***
Net Time
ECHO MAPPING NETWORK DRIVES
:Accounting
\\DC\Netlogon\ifmember Accounting
if not errorlevel 1 goto NEXT
echo Connecting to ACCOUNTING ...
net use I: \\FSvr\ACCOUNTING /y
:NEXT


net use F: \\FSvr\COMPANY /y
net use Z: \\FSvr\SHARED /y
0
 
LVL 10

Accepted Solution

by:
abt-it earned 500 total points
ID: 34110040
If you have a 2008 Server as domain controller you can use the group policies to map network drives. See http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_25340274.html for a how to.

This is a bit smarter than using ifmember to map shares to different usergroups.

If it's a 2003 DC, you must save your login Script (and ifmember.exe) inside the sysvol\netlogon of the server and add the script as logon Script for each user with the mmc active directore users and computers.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Written by Glen Knight (demazter) as part of a series of how-to articles. Introduction One of the biggest consumers of disk space with Small Business Server 2008(SBS) is Windows Server Update Services, more affectionately known as WSUS. For t…
The SBS 2011 release date (RTM) is supposed to be around Christmas, 2011.  This article is a compilation of my notes -- things I have learned first hand.  The items are in a rather random order, but I think this list covers most of what is new and d…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now