Showing posts with label group policy. Show all posts
Showing posts with label group policy. Show all posts

Tuesday, October 22, 2013

Assigning local rights through Group policy and making it work

Trouble getting local computer rights assigned through group policy?  Have you read all the articles that tell you to edit the GPO and assign the rights?  Are they still not showing up on your Windows XP machines?  That's the trouble I ran into.

Before I get too far into this.  Let's go back to begining.  We made the switch to from a Novell network (Netware servers, eDirectory, ZDM, iPrint and the Novell Client) to Microsoft network (Active Directory).  After the switch we needed someway to manage the rights that local users have on machines.  In the past we used ZENworks and when users logged into their computers (through the Novell Client), Zen would pick that up and create a local user for that person with the rights that we assigned and then seamlessly log the user into that account.  When using AD it doesn't work the same.  The users just log into the machine, because the machine is in the domain they don't get (or need) a local account.  Which is great, except that some of the people need to be administrators or power users.  I know I could go through group policy and assign specific rights, but we don't need that granular of control.  Just making them members of the local groups is good enough.

Now there's a couple of ways to get them in as member of a group.  The original way to do it with group policy was to use the Restricted Groups feature.  Doing it that way makes sure people are members of the group and that only those people are members of the group.  That's nice for some environments, but we don't need that level of control.  For us, all we need is to add people to groups from time to time.  There's a new way to do just that.  Well, I say new way, it's been around for 5 or 6 years.  Its through an addon to group policy called Client Side Extensions.  Microsoft bought out a company that was doing some neat group policies addons and then MS built it into Windows and released it free of charge for all to use.  But that's a story for a different day, the point is that I wanted to assign the group membership using this part of gorup policies. So I started doing my homework.  I read a lot of posts about using them and I dug through the MS documentation.  It seemed pretty straight forward, I made my own policy, I assigned it, then I tested it, and then I found out it didn't work.

What had I missed?  I went back through and double-checked everything.  And then I tested agian.... nothing.  And I tested again and again.  It just wasn't working for me.  As it so often happens I got pulled away to work on something else, but I had left the policies applied.  They weren't working but didn't appear to breaking anything, so what did it matter, right?  A few days passed and then I got back to working on this problem again and guess what, it worked.  Right... it worked.  Go figure.  What had changed?  I went back through everything and the only thing that had changed was my test machine.  Lesson learned, if at first you don't succeed, try a different test machine.

Now that I knew the problem was in my machine, I just had to figure out what exactly it was.  Back to the internet to see what pieces made these group policy extensions tick.  What I found was two different Windows update that make it happen.

The first one is KB915865 which covers XMLLite.  If you're running XP 32-bit here's that download link so you don't have to go looking for it http://www.microsoft.com/en-us/download/details.aspx?id=13978

The second update is KB943729 which covers the actual new Group Policy preferences.  If you're running XP 32-bit here's that download link as well, http://www.microsoft.com/en-us/download/details.aspx?id=3628

Now that you know what you need to you need to figure out what systems need it right?  Well the fastest way for me to tell if the computer is working right is to use NET LOCALGROUP ADMINISTRATORS at a command prompt.  We've got a couple of accounts that we add as local admins on all machines, if the only thing listed on that command is a "MyDomain\Domain Admins" then I know I'm missing one of the updates listed above.

How about a quick way to tell which update you're missing?  Check the C:\WINDOWS\SYSTEM32 folder.  The XMLLite update installs an XMLLITE.DLL file, if it's there, then the update has been installed (of course it could be corrupt or not registered correctly).  To see if Group Policy preferences update has been installed look for a GPPREFCL.DLL file.

So one command to see if it's working.
NET LOCALGROUP ADMINISTRATORS

And two commands to figure out what you're missing.
DIR C:\WINDOWS\SYSTEM32\XMLLITE.DLL
DIR C:\WINDOWS\SYSTEM32\GPPREFCL.DLL

After you install the updates just let the machine reboot and log back in.  I have noticed that on the faster machines if you log back in after the reboot with a machine that's supposed to be getting admin rights that it doesn't get the rights on first log in.  If you check the group memberships it shows up rights but you don't have admin rights.  I think what's happening is that the system is logging the account in before the group policies have time to finish applying and since the memberships haven't assigned when the account logs in it doesn't get the rights.  By time you can check the memberships it shows up correctly, but you don't have the rights because the weren't there at login.  The fix is to just log out and back in and then you'll have the rights.  The irony is that it seems like some of our slower machines are not affected by this, I guess the policy has time to finish applying before it actually starts processing the login.  Who knows?  If all it takes is a log off and back on, I'll take it.


Friday, October 11, 2013

Remotely installing software

Ever need to install software remotely?  Why not just fire up Remote Desktop (or VNC) and connect and install right?  That works great if it's one machine you need to install software on.  What happens when you have a lab full of machines that you need to install software on?  You either need a lot of time or something that works faster than remotely installing it on each machine.  So what are you options?

A login script.  Great!  But you have to make the script, associate with only the machines (or specific user) that you need it on, and then wait for someone to log into the machine.  Or remote the machine and log in yourself, but that doesn't really help us speed up anything since we need to make sure it gets installed.

Group policy.  The old school way to push software requires an MSI.  The programs that I was installing didn't come packaged in an MSI, it was an EXE.  Yes, I know I could repackage it into an MSI, but I want to get this software installed quick and I don't want to spend the time on that.

Third party management software.  Yes, this a really good option.  The problem is that we're still working the bugs out of the management software right now and for an unknown reason it doesn't want to push these installers.  The long term way to push software is going to be to get this fixed.  But right now I'm going to postpone troubleshooting on the management software just so I can quickly get this software installed and get the end users back running.

So what did I finally go with?

PSEXEC.  Psexec is your friend.  It's one of the ps tools available from Microsoft (formerly Sysinternals). It's a free download and it will let you execute commands on remote systems.  So with a quick (and very dirty) batch file I was a able to loop through a list of computer names and install programs that I needed to get installed.

psexec /? will give you all the options, but for my purposes here's what I used:

psexec \\machinename -user someuser -p somepassword C:\installerfilename.exe /switches

And that's it.  Well, actually I used a FOR loop in a batch file to process through all the machine names, but the actual work was done with that command right there.

Here's a link for info on the FOR loop.  http://ss64.com/nt/for2.html   This post is starting to run so I'll save the notes about FOR loops for another post.

Saturday, August 22, 2009

CD Burning for Power Users in XP

What happens when you've got non-Administrator users (like Power Users) that need to burn CD's under Windows XP? It must be group policy setting, but where? I went over the local group policies with a fine tooth comb and couldn't find the "Allow Non-Admnistrator users to burn CD's" settings. There are a lot of crazy ideas floating around the internet about how to make this work and most of them don't work. But, I did come across 2 (or 3, depending on how you look at it) working solutions.

I actually first encountered this problem some time ago, but the problem recently reappeared. I couldn't find my original notes on how to fix it so I turned to Google, armed with a vague idea of the solution and found the answer within a few minutes. Now I'm making notes for all the world to see and hopefully, this post will be of help to someone else.

The first solution, and seemingly more popular one on the internet, is to use a small application from the makers of the Nero called Nero BurnRights (you can find it here http://www.nero.com/enu/support-nero6-tools-utilities.html ). You can install and configure it by hand if you want, but it's easier to automate it with a script or batch file. There are a few command line switches to help out. The switches I liked were: /silent and/burnrights:all. That sets everyone up to be able to burn and makes the installation silent so it doesn't interrupt anyone while it runs. There's only one catch, you have to be an administrator to run the installer. Otherwise the installer craps out (silently, of course) and it doesn't actually install anything.

Now, I don't have Nero installed on every computer, a lot of them run InfraRecorder. This problem shows up in InfraRecoder as the program launching but not being able to see any available burners. It seemed to be overkill to have to install one application to make another application run so I wanted a better and easier solution. Where's that simple group policy setting or registry key that fixes this problem? Obviously if one group (Administrators) can burn and another group (Power Users) cannot burn then it has to be a fairly simple rights issue. I worked off and on for several days when I stumbled upon the solution in an unlikely place. Over at AppDeploy.com I was looking at some of the configuration settings for the Nero suite ( http://www.appdeploy.com/packages/detail.asp?id=627 ) and I found in the notes section that TheWorkz had answered my questions:

I have found instead of using Nero Burn Rights for user rights to Low Level Device Access in Windows XP, you can use the following registry key/Policy to enable users rights to CD Drives.

Registry Key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"allocatecdroms"="1"

OR

Group Policy
Policy: Local Policy > Security Options
"Devices: Restrict CD-ROM Access to Locally logged-on users only" = Enabled

There it was, as simple as that (imho a lot easier that the BurnRights solution listed above). I'd seen that group policy setting before, but my logic had been flawed. I had incorrectly assumed that I needed less restriction instead of more. One might argue that if you apply "Microsoft logic" that it all makes perfect sense. Whatever the case, changing this setting works.

You might be saying, "Come on! Still battling with Windows XP?" This is 2009 and we all know Windows Vista has been out for a while and Windows 7 is right around the corner. But this is practical school tech, and for all practical purposes Windows XP is going to be around for a while in public education. I've got Windows 98 machines still floating around and I know of school systems that have gotten rid of their last Windows 3.11 machines in just the past few years. If it upsets you that your children are using really old computers at school, call any politician that you know and tell them that more money needs to go to technology in education. In this economy they may laugh at you, but once the economy turns around it might help. It can't hurt can it?