Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Wednesday, December 3, 2014

More things I should probably know: SNMPv1/2 and SNMPv3

In the category of more things I should know (AKA I hate printers).  

Printers are often built off Simple Network Management Protocol (SNMP).  SNMP could have been a great thing.  It allowed a lot of different things to be done remotely, and was great for the system administrator miles away from the site.

Then people realized that SNMP version 1 and 2 have no real way to be secured.  None.  There is no way to create secure SNMPv1/2.  So the only thing to do is turn it off on the printer.  After you turn off SNMP v1/2 on the printer, your printer goes offline and now you can't print.

The Windows troubleshooter tells you the printer is powered off.  You moan.  You groan.  You Google things.

Anyways, the answer is in turning off SNMP on the device.   Note this problem only applies to network printers.  USB printers don't have this issue because they have a direct connection.

In Windows 7, navigate to devices and printers.
Right click the offending printer.
Printer properties.
Ports tab
Find the check marked tab, and hit configure port.


See that lovely SNMP Status Enabled check mark?   Get rid of it.  

Ok until you are out of all the messages, and magically your offending printer spits out 85 sheets of paper because someone hit the print 30 times, thinking they hadn't hit the button.

Now that you've solved the Windows problem, it's back to the printer.

So, the printer companies occasionally make software to check on their printers and get meter readings.  Larger companies lease printers and charge monthly and for printing more than an allocated amount.  Or they charge by the page.  For those companies to make and collect their money, they have a tendency to use SNMP to get readings from each printer.  Compare the beginning from the ending, and you have pages used.  

Simple.

But SNMP v1/2 aren't secure so you have to find how to turn on SNMPv3 on the printer.  That's usually a matter of finding some sort of web interface and then setting up the read and read/write strings.  That usually varies by printer manufacturer.  

So what about Windows?  Windows doesn't support SNMPv3, and Microsoft is removing SNMP support in future versions of Windows.  If you really like SNMPv3, and can't live without it you have to find your own SNMP tool.

I find SNMP interesting, but the inability to secure it properly and the need to get 3rd party support to get it working properly tells me the easiest thing to do is turn it off and get rid of it.

FYI, SNMPv1/2 vulnerabilities are considered bad ones and will cause a failure in internal PCI compliance scans.



Monday, November 3, 2014

Active Directory and Content Adviser part 2

Found a solution to the problem I talked about the last post.  The answer was use a proxy server.  The proxy server is actually a file pointing to the local host with a bit of scripting involved that either returns the outside interface "proxy server unavailable".  Which works out pretty well, because you get the effect of blocking the Internet.  The proxy file is located on a read-only network share, and is copied to the computer whenever the user logs in.  So even if the Internet goes down, you still have the old proxy file.  And when the Internet comes up, you get the latest, greatest version.

That seems to work a lot better in theory than content adviser.  And for some reason I want to spell adviser as "advisor".  Anyways.

The hard part was need to rebuild the IE auto-install to get the proxy settings into the Internet Options control panel, and turning off Content Adviser.  That required removing the computer from the domain, use "Turn Windows Features On and Off" to remove and re-add IE 11 with none of the IEAK options set.  The rejoin the domain, and then the IEAK version to have the proxy file working and in place.

The great benefit of this approach is the proxy file works with Chrome as well.

But there are certain programs we use that are hard coded to use Internet Explorer, so there's no option of permanently going away from that.

Yay.   Now all I have to do is get the logon script working properly, and everything will be great.  Did I mention I'm deploying the computer Monday afternoon?

My Active Directory learning was from this book: Windows Server 2008 Active Directory Configuration.


Friday, October 31, 2014

Active Directory makes me something something....

Been working on Windows Server 2008 Active Directory automatic installation.  All I want to do is use automatic installation of IE 11 with a specific Content Adviser set.  But no.   When I update Content Adviser using the IE Automated Installation Kit, it doesn't update Content Adviser.  It doesn't even install.

Great.

Back to beating on the same problem.

Tuesday, December 31, 2013

More Direct X (or direct failure)



And the install of the Direct X SDK didn’t work.  Great.  Just great.  Or at least it didn’t work for C#.  Maybe I should wade back into C++.  Let’s see what happens when I install one of those suckers.

First, the typical “project out of date with your compiler” problem.  Let’s wait for that to finish…

Ok, so wow… it actually compiled and ran.  There’s some stinking progress. 

Now I just have to figure out what in the world happened to the C++ I used to know… 

Ok, it still makes a relative degree of sense, so I’m not completely lost…  Flabbergasted and behind the times by many, many years.  But I think I can read up on this and make it work.  At the very least, the sample compiles, and that’s more than I could say for the C# stuff. 

Honestly, this is why I gave up C++ in the first place.  Building frameworks gets old after a while.  Especially if you just want to test something fairly basic before spinning it into something larger.  Is that so much to ask?  Really, I don’t think it should be. 

And for me, that’s the appeal of C# and VB.  You spend a lot more time programming and a lot less time reading documentation, figuring out what variable you need to get a text box to appear.  That streamlining of certain parts makes the entire thing much more palatable.  So I guess those days are over for the most part.  Partly because Microsoft writes cruddy documentation and partly because I’d rather spend time doing want to do as opposed to hunting down every single esoteric little variable that may or may not be used and is probably not documented very well.


Monday, December 30, 2013

Search Failure



I’m on vacation after Christmas, and will be until Monday the 30th.  Fun, fun, fun.

Anyways, I had a dream about a wacky adventure/puzzle/exploration game that I happen to be calling Spy Game at the moment.  I thought the idea was really cute in the dream.  You get several disguises and wander around a town, trying to find your way into different areas.  Because you are dressed as different things, you get different conversation responses.  And then if your disguise fails, you are kicked back out on to the street.  All it all looked kind of like Animal Crossing to me, except more at a 3d level instead of 2d.  I highly doubt I will complete the thing, but I want to at least give it a try. 

So I decided to write the whole thing in DirectX with C#.  Now, me and DirectX go back a while.  At one point, I had a fairly decent framework going in C++, but then I started trying to fix certain things and the code became unmanageable and I abandoned the entire thing.  Well, fast forward a decade or so and I decide to attack Direct X again.  Except I can’t figure out where to download the SDK. 

Now, to be fair I was searching through the MSDN website in order to find something that (should) be easily findable.  But no… all I find is the page, informing me “the Direct X SDK is implemented as part of Windows 8, and you don’t have to do anything”.  Which would be really great if I was trying to write something for Windows 8.  I’m not.  I have yet to adopt Windows 8, and am really happy with Windows 7.  Truthfully, I’d move to Windows 7 64 bit if the legacy apps I needed for work ran under it. 

Oh… and the other fun part.  I also spent a good 30 minutes searching for basic tutorials for C# and Direct X and get…  C++.   Way to go Microsoft.  Your website search sucks.  I eventually landed on a forum post that pointed out some decent introductory resources.  But as far as finding the info through the search?  HAH!

And for the SDK itself?  I gave up and searched Google.  Found it on the first search.

Now, I’m downloading the SDK and writing this, ready to jump into the world of Direct X and C#.  Maybe I’ll have something interesting to say about it all. 

Monday, November 25, 2013

slowing through Quicken. And Excel.



I love Excel.  Really, I do.  Better than any budget software, it can easily validate thoughts and ideas, and give a long term road map to where you want to go.  Sitting down with that road map, you can plan for the future and dream like no tomorrow.

I use Quicken 2011 as well, but that doesn’t really give the frame work to plan or just throw stuff out.  Parts of Quicken are really good, and parts of it just suck.  But that’s okay.  I think the problem is there is an absolute depth to Quicken that is only discoverable through years and years of work, and there doesn’t seem to be any decent way to learn it all. 

I find it annoying when I run a program, and find a chart that is really, really good.  And I have no idea where I am or how to get back to that chart.  I don’t like the nags in the program, either.  I’ve never had any decent success with automatically syncing bank accounts.  The last time I tried, it randomly created a 2nd bank account and ignored the one I had manually created.  So I quit trying to sync accounts.  But the program keeps harassing me and asking me to go back and “Why don’t you sync this account?” And I sometimes answer “Because that never works, you piece of junk.  Now quit asking me”.

I also dislike data entry on the thing.  I realize I spend a lot of time at convenience stores.  I work for one.  But Quicken should realize that a deposit from the company is NOT going to be an expense category.  But that happens every time.  The system constantly thinks net salary is groceries:snacks.  One is an expense, the other is income.  Come on, system.  Figure it out.  It’s not that hard. 

Also, on the planning section, only should the items that are due this month.  I may set something up to reoccur every month for the next six years, but that doesn’t need to show up in my monthly budget and cause me havoc.  The more I fight with the spending planner, the less I use it.  It’s much easier to use Excel because it is both more flexible and user friendly. 


Saturday, November 2, 2013

Lost Files




I wrote a countdown timer in C# over the last few days.  It’s the beginning of something much grander, though I doubt it will ever reach what I want it to become.  That’s another story.   In the process of changing the name on a menu strip, I broke the whole program.   Go me.  I guess I should have paid attention to the whole programming axiom that one should never rename items in a class-based design after you’ve messed with subsections.  I think I’m probably going to have to re-code the entire thing from scratch.  Maybe. 

I store my code in my DropBox folder so I don’t have the problem of losing the code.  I hate losing good code, and I’ve lost a lot of it throughout the years.  Just during that period, I had a couple of different thoughts.  The first was to check DropBox and look for previous versions stored somewhere there.  That didn’t work.   I then thought of something I did to fix some network drive files my boss lost.

In that situation, my boss got a virus and the system noticed and wiped his connection to the drive.  With that wipe, he lost everything he had stored there.  Well, he runs Windows 7 Pro, so the best method of recovery was right-click the folder, properties, previous versions, restore to the version created yesterday.  And it’s back up and running.   Granted, I’ve lost all the stuff I programmed today.  But that’s better than having to restore the entire thing from scratch.  I have to admit, Microsoft started getting better and better with Windows 7.

Tuesday, October 15, 2013

C#



So I’ve recently started messing with C#.  I think I like it.  It seems more robust than VB without the need to do absolutely everything that comes with C++.  Don’t get me wrong, I still like both languages.  It’s just that a drag and drop editor is a great and awesome thing.  There is no longer a need to spend six hours trying to do something ridiculously simple.  Plus, C++ has been jacked with so much in the last few years I can’t even seem to get a simple console program to compile anymore.

Anyways, I think with learning any language, the real goal is to find something to do with the language.  Learning something is much easier if you have a problem to solve.  So for work, I had a problem to solve and that facilitated learning C#.  I’ve got backups to that run here and there.  That works great, but really, if you aren’t sure your backups are running and up to date, then what good is the automated system?  So I needed a checks and balance system for the automation I put in. 

I ended up writing a console application that checks for the existence of all the backup files, and then checks the age of those files to see if they have been updated in the time frame I expect them to be updated in.  After all that is done, I send myself an email to let me know how the backup went.  Now, all I need to do is fix the formatting, and set it up as an automated Windows task.

While writing this post, I decided I only wanted a negative response.  Meaning, I only want to know about things I have to take action on.  So I changed the info to do just that.

The other thing I want to say is exercise caution with the MSDN forums.  Sometimes, they are quite useful.  Other times, they are a filled with snarky jerks trying to put people down.  It basically sounds like “you don’t know how to do that?  You’re so stupid!”.  I called out the last idiot that decided to do that.  So yeah, be prepared for jerks.  Don’t take it personal.  It’s a forum, and people on forums are naturally jerks. It’s well documented.