Tue, 07 Feb 2006

Firebug: DHTML debugger

Firebug looks interesting. From the homepage:

FireBug is a new tool for Firefox that aids with debugging Javascript, DHTML, and Ajax. It is like a combination of the Javascript Console, DOM Inspector, and a command line Javascript interpreter.



posted at: 20:20 | category: /knowledge/software/firefox | permalink


Fri, 27 Jan 2006

Multiuser Screen

So, you have two people who want to share a common terminal, but they don't want to (or can't) bang on the same keyboard and peer at the same screen.

Multiuser screen to the rescue!

You have two users, userH and userG, and one relevant machine, hostH. Both users have a terminal window on hostH (because both users have SSHed in, or one is on the local console, or whatever).

Requirements: ensure that the terminal window is the same size in both cases, and that the screen binary on hostH is SUID root.

UserH (the 'host' user) runs the following:

 screen -S <some name>

UserH will then have a running screen session named "<some name>", and must then enable multiuser and allow the other user to connect by typing the following in their screen session:

 CTRL-A :multiuser on
 CTRL-A :addacl userG

Now userG can run the following in their terminal:

 screen -r userH/

And now both users are in a common screen session. Both of the users' keyboards will enter characters, so have some sort of out-of-band mechanism for collision avoidance. Either user typing 'exit' will quit the screen session. Remember that the session is running with the permissions of userH (who started the screen session), so don't do this with people you don't trust to peek at your pr0n stash.



posted at: 11:35 | category: /knowledge/software/screen | permalink


Fri, 06 Jan 2006

Disable source browser in Trac

Since I'm not a subversion user particularly (and some of my Trac uses thus far aren't for code anyway), I want to disable the Browser tab in my Trac UI.

Simply add the following to your trac.ini file:

[components]
trac.versioncontrol.* = disable

And then restart tracd (if you're using it).

Ref: The TracIni page in the Trac wiki, the [components] section. Specific LHS for the line comes from the "About Trac" Plugins subpage.



posted at: 20:30 | category: /knowledge/software/trac | permalink


Thu, 27 Oct 2005

Creating System Users in CFEngine

On many cfengine-managed systems, you need to be able to create users for local purposes. Jamie Wilkinson, CFEngine guru extraordinaire, does it like this:

For system users:

groups:

   user_X_exists = ( ReturnsZero(/bin/sh -c "/usr/bin/id -u X >& /dev/null")
)

shellcommands:

   !user_X_exists.redhat::

     "/usr/sbin/useradd -r -c X -s /sbin/nologin -d / -M -g nobody X

   !user_X_exists.debian::

     "/usr/sbin/adduser --system --gecos X --shell /bin/false --home /
--no-create-home --disabled-login --disabled-password --group nobody X"

I do it with macros, so I don't have to type all that crap for every system
user I need, and so things like home directory and default group can be
changed easily.

In a perfect world, this idiom would turn into a users: section, but alas
I've not yet had the time to write a patch.

For humans, I use LDAP, and cfengine just takes care of configuring the auth
system.

Michael Chesterton, on the other hand, prefers the modular approach:

module:users

#!/bin/sh
  /usr/bin/getent passwd |\
    /usr/bin/awk -F: '{print "+user_" $1 "_exists"}' |\
     sed 's/-/_/g'


control:

AddInstallable  = ( user_user1_exists user_user2_exists )
actionsequence  = ( module:users shellcommands  )


shellcommands:

   !user_user1_exists.redhat::

     "/usr/sbin/useradd -r -c X -s /sbin/nologin -d / -M -g nobody X

...

It seems to work without addinstallable, but the docs say to use it, so
I do, otherwise there is a little less typing.


posted at: 13:45 | category: /knowledge/software/cfengine | permalink


Fri, 09 Sep 2005

Remote-enable Terminal Services

Presumably only XP machines...

http://www.windowsdevcenter.com/pub/a/windows/2004/05/04/serverhacks_remote.html



posted at: 11:10 | category: /knowledge/software/windows | permalink


SugarCRM: Concepts

(Distilled from http://www.sugarcrm.com/home/Sugar_Suite_Documentation/189/)



posted at: 11:10 | category: /knowledge/software/sugarcrm | permalink


Nagios/RT integration

It's really handy to be able to automatically generate tickets in RT when Nagios detects a problem. Complicating things slightly is the fact that Nagios has a bit of issue management built-in (notifications and acknowledgements) but not nearly enough to make it an RT replacement.

So, instead, we get this. It's a patch to Nagios to make it work better with RT. Probably not perfect workflow for everyone, though.

http://lists.bestpractical.com/pipermail/rt-users/2005-June/031775.html

posted at: 11:10 | category: /knowledge/software/nagios | permalink


Nagios/RT integration

It's really handy to be able to automatically generate tickets in RT when Nagios detects a problem. Complicating things slightly is the fact that Nagios has a bit of issue management built-in (notifications and acknowledgements) but not nearly enough to make it an RT replacement.

So, instead, we get this. It's a patch to Nagios to make it work better with RT. Probably not perfect workflow for everyone, though.

http://lists.bestpractical.com/pipermail/rt-users/2005-June/031775.html

posted at: 11:10 | category: /knowledge/software/rt | permalink


Check a recipient address against Exchange

Thank $DEITY for LDAP...

http://www-personal.umich.edu/~malth/gaptuning/postfix/



posted at: 11:10 | category: /knowledge/software/postfix | permalink


Submitting passive check results via e-mail

A little bit of Perl to receive an appropriately-formatted e-mail and submit a passive check result to Nagios.

http://naplax.sourceforge.net/REL.html



posted at: 11:10 | category: /knowledge/software/nagios | permalink