Solved

Secondary Domain Controller as Print Server

Posted on 2008-06-24
4
597 Views
Last Modified: 2008-07-02
Hello to all Experts!

Have a slight problem.  We have two servers, one primary DC and one secondary DC.  We have installed and shared all of the printers in our organization, on the secondary DC.  Now, the issue is when any user logs in, and they receive their credentials from the primary DC they do not receive the printers.  However, if by chance they authenticate against the secondary DC they do receive the printers.  How can we make it so that if they authenticate against the primary, they receive the printers?  Any help will be greatly appreciated.  The printers are all shared from the secondary DC, and are published in Active Directory.  

Thanks in advance!
0
Comment
Question by:kmount
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
Sinder255248 earned 500 total points
ID: 21863301
What about a logon script based on group membership:

-----------------------------------------------------------------------------
Dim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, Path
Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")
Set oNet = CreateObject("WScript.Network")
Set objDomain = getObject("LDAP://rootDse")
DomainString = objDomain.Get("dnsHostName")
UserString = WSHNetwork.UserName
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
Set objShell = CreateObject("Wscript.Shell")
Set Network = Wscript.CreateObject("Wscript.Network")


For Each GroupObj In UserObj.Groups
    Select Case GroupObj.Name
        Case "IT"
            Network.AddWindowsPrinterConnection "\\printserver\ITprinter"
    End Select
Next

For Each GroupObj In UserObj.Groups
    Select Case GroupObj.Name
        Case "Editorial"
            Network.AddWindowsPrinterConnection "\\printserver\editorialprinter"
    End Select
next
-----------------------------------------------------------------------------------
0
 

Author Comment

by:kmount
ID: 21879387
Hi Sinder255248,

Thanks for the help, and sorry for my delay in responding.  

Now, I have used a differnt script (from the one you provided).  It works well when it runs.  However, I have this script applied to a certain group of computers.  The sript has been added to the logon script of the computer configured for our "QuietRoom" OU.  At first it seemed to work just fine.  However, later on it just stopped working.  
I have ran gpresult /v and saw that the policy is being applied, and is NOT being filtered out.  Since it's applying the policy, it should connect the desktops to their respective printers.... However, it does not.  Any insight on this?  This is more of a AD question..

Thanks!
0
 
LVL 8

Expert Comment

by:Sinder255248
ID: 21893392
How are you running the script in your GPO?  Is it being called from a batch file using the cscript command or are you running it specifying the vbs file?  Can you paste the script on here?
0
 

Author Comment

by:kmount
ID: 21918442
Hi Sinder,

The script is in a vbs file, which is being called by a gpo.  I figured out the issue with the policy not being applied to specific computers.  It was the whole "loopback" problem, and I didn't have that set to "Merge" mode.

Anyway, if you would like here is the script that I'm running.  
Option Explicit
Dim objNetwork, strLocal, strUNCPrinter1, strUNCPrinter2, strUNCPrinter3
strUNCPrinter1 = "\\server\server-share1"
strUNCPrinter2 = "\\server\server-share2"
strUNCPrinter3 = "\\server\server-share3"
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection strUNCPrinter1
objNetwork.AddWindowsPrinterConnection strUNCPrinter2
objNetwork.AddWindowsPrinterConnection strUNCPrinter3
objNetwork.SetDefaultPrinter strUNCPrinter1
WScript.Quit

Thanks!
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

636 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