VBscript undamp; Active Directory and printers

Well, since our current solution for mapping printers is an ugly batch file, which needs to be put into Startup, I today poked at doing it in VBscript (I know, but it’s less ugly than the batch script, trust me). As some of you know, printers are only applicable to users (as in you can’t put a startup script onto an OU, which is going to map the printers). So as we store users and the computes in different OU’s in our Active Directory (we do have about 15.000 students), I can’t apply the printer.vbs to the users OU directly either, unless I implement some intelligence into the script itself. ...

August 16, 2014 · 2 min · 348 words · christian

VBscript undamp; Active Directory and printers (continued)

As I posted earlier, I tried working around some limitations in Microsoft’s Active Directory by teaching the script some intelligence. But, since we recently started using Thin Clients, all the stuff I did with the fancy vbs was just a waste-of-time. Turns out, Windows XP Embedded doesn’t work quite the same as a " normal" Windows XP (that’s where I tested the script on), and it simply dies when running the WMI Query. Bollocks. ...

December 5, 2008 · 1 min · 139 words · christian

Nagios undamp; plugins

Since we started utilizing Nagios’s power two months ago, I finally came up with a C-based ram-plugin for nagios. The biggest problem I had with the python and perl based plugins, that some distributions (yes, SLES and Debian) don’t install either Python or Perl. Since I wanted a manageable setup (as in unified code base across all distributions), I wanted it to work without installing too much. So I took the swap plugin and basically removed what wasn’t necessary and voila! ...

October 6, 2007 · 1 min · 115 words · christian

TYPO3 and MySQL replication

Apparently the TYPO3 version we are using, doesn’t play too nice with the MySQL MasterMaster replication. Sometimes, something like this is going to happen: 1 2 070826 0:44:32 [ERROR] Slave: Error 'Duplicate entry '75-222419149' for key 1' on query. Default database: 't3nb'. Query: 'INSERT INTO cache_pagesection 070826 0:44:32 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'dbc-mysql1.000192' position 611861372 Well, as you can see from the last line in the log, the Slave-SQL thread found a duplicate entry and thought it is smart to just turn off the thread instead of disregarding the just made entry. So from now on, both databases drift since there ain’t no replication anymore until someone kick starts the replication again (someone being me). ...

September 8, 2007 · 2 min · 308 words · christian

Handling files/directories with spaces in `for'-loops

So I have one or the other file, that needs to be extracted to a directory. And why not name it as the archive itself .. Only problem with it is the handling of variables with bash … Try it yourself, stuff some directories with a space in inside a variables, and use something like this: 1 2 3 epimetheus tmp [0] $ mkdir files epimetheus tmp [0] $ touch files/"I hate directories.archive" files/"Me luuv you looong time.archive" epimetheus tmp [0] $ for i in $( /bin/ls --color=none files/ ); do mkdir "${i/.archive/}"; done And now take a look at the output of that .. ...

July 8, 2007 · 1 min · 199 words · christian