Solved

Login script for Win2003 Server using the IF condition to determine if a user is in a group or not to map network drives

Posted on 2004-09-23
3
265 Views
Last Modified: 2012-06-21
Hi

I want to map network drives based on if a user is in a particluar user group in AD . I guess using the login script ie dos bacth file , net use command

ie I gave a user group called sales

I login as joe bloggs who is in the sales group in the local domain  . The login script does a if statement to determine if Joe Bloggs is in that group or not

ie  " if  "user" Part of  "  Sales Group" Then
              net use L: \\Server\Share
                 else
                  End


Ie something like that I suppose ???

Also can ths work across multiple domains ? ie map a drive to another share on a another server in a different Domain ?


 
 
0
Comment
Question by:Davidedi
3 Comments
 
LVL 7

Accepted Solution

by:
sj_hicks earned 125 total points
ID: 12140066
The IFMEMBER utility included in the NT/2000 resource kit will do this.  See info at http://www.win2000mag.com/Articles/Index.cfm?ArticleID=5869

An alternative to using a batch file login script is to use a VBScript.  Do a web search and you should find plenty of samples.

You should be able to map drives across domains providing the appropriate trusts are in place.
0
 

Expert Comment

by:kdb01
ID: 12140151
Might help ??? I create containers (OU), I just put a straight dos batch with the proper net use in the container i want to give the specific shares to. I keep the groups to assign access rights only. Makes my life easier. I used to use the IFMember utility back in winNT4 and it works fine.  
0
 
LVL 3

Expert Comment

by:onesquin
ID: 12146214
Remember with login scripts... LESS IS MORE.  If loops and that are great... BUT if you can break it down into OUs and assign login scripts to each OU group logins will be quicker and less complex.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

947 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