2007-07-15

Getting 'sudo' Working

There is a simple bit of information that has finally penetrated the fog of insanity that surrounds computers and related equipment that information is this:

When using the sudo command under Linux [don't know about other systems, yet] it is the case that users who are listed in the /etc/sudoers file actually use their own account password to execute the sudo command, not [as some of use might have once thought] the root account password as is used when accessing the root account with the su command.

This information has now been shown to be true under systems that include, but are not limited to:

  • KNOPPIX (with passwords and user accounts enabled
  • Debian
  • CentOS

Full dmesg Output for a220n under KNOPPIX

Capture of the output of the command dmesg performed under KNOPPIX on the HP Pavilion a220n:

Here is the output of uname -a for this same system:

Linux Knoppix 2.6.17 #4 SMP PREEMPT Wed May 10 13:53:45 CEST 2006 i686 GNU/Linux

Audio Problems on HP Pavilian a220n under Debian Linux

This is an excerpt from the output of the lsmod command run under KNOPPIX on an HP Pavilion a220n desktop computer:

snd_intel8x0           31260  3
snd_ac97_codec         88352  1 snd_intel8x0
8250_pnp               12288  0
snd_ac97_bus            6016  1 snd_ac97_codec
snd_pcm_oss            38176  0
snd_mixer_oss          17536  1 snd_pcm_oss
snd_pcm                73220  4 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer              22148  2 snd_pcm
shpchp                 37032  0
i2c_nforce2             9856  0
snd                    44768  10 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer

For some reason neither KNOPPIX 5.0.1 nor the Debian install to the hard disk [provided by the KNOPPIX LiveCD via the knoppix-installer command] seem to be able to get the audio input functionality of the sound card working.

Audio output works okay when the Sound System is enabled via the KNOPPIX control panel, but does not appear to work under the Debian instantiation of KDE.

No version numbers captured yet from the Debian kernel, or the versions of KDE involved (which are different between the Debian install (with updates) and the KNOPPIX distro.

2007-07-11

MSN Proprietary Wink Protocol?

Has anyone put a protocol sniffer on the MSN protocol lately? I'd like to have the protocol definition for the proprietary winks [shown in photo as rendered in Pidgin IM client v2.0.2 ] - or maybe they're filtering on the server? Can I spoof the IM client ID to the MSN server?

Zoom the screenshot to read the text ad sent by MSN servers to my IM client when the person I was chatting with sent a [apparently proprietary to MSN] "wink"

Note that Pidgin IM client is the former Gaim IM client for windows, AND that Pidgin's domain is the first instance I've seen of a working .im TLD [it is pidgin.im]

[And: props to my new sweetheart for sending that wink which highlighted this issue for me - apparently no one else talks [types] to me quite like that, kittykitty]

2007-06-16

Parking a Domain

Message from cPanel when domain is successfully parked:

Parked Domain Additions

Using nameservers with the following IPs: 67.43.9.227,67.43.9.226 Bind reconfiguring on host using rndc
Created DNS entry for americanwifi.us
americanwifi.us was successfully parked on top of weedllc.net 

This went pretty smoothly:

  • On the first try, the cPanel utility came back with an "number of parked domains allowed exceeded" message - had to go back and add domain parking to the account using Web Host Manager (WHM).
  • … on the second try, the cPanel utility to Park a Domain" failed with an error indicating that the americanwifi.us domain was using name servers that were not on the weedllc.net domain, and so the domain could not be parked there;
  • … went to the godaddy.com control panel interface (GoDaddy is the registrar for americanwifi.us) and set the name servers for the domain
  • … the parking maneuver was accomplished on the third try, after setting the number of parked domains allowed for weedllc.net and the DNS server records for americanwifi.us
  • There was not real waiting for any of these steeps - the longest wait time was for godaddy.com to update the domain domain records for americanwifi.us
  • Also, had to "unlock" the domain record for americanwifi.us before changing the name server record(s). Not sure if it can be re-locked now that the name servers are off godaddy.com
  • New name servers of record for americanwifi.us are ns1.weedllc.net and ns2.weedllc.net
  • The DNS changes for americanwifi.us seem to have already propagated at this time: 2007-06-16 13:39 EST

2007-06-14

Customize a Device Icon in WinXP

This information is quoted from the page at Microsoft.com:

Including Icons in Device Driver Packages

Note: The following information will be included in a future 
version of the Windows DDK.

Once you have created a custom icon for a device, you can include
the icon in the device driver package by referencing it in the INF
file. The DDInstall.HW section is used to set driver-independent
information that is device-specific.

In the sample INF sections that follow, the DDInstall.HW section 
points to a separate AddReg section, which specifies the personalized 
icons.

[DDInstall.NT.HW]
AddReg = IconInformation
[IconInformation]
HKR, , Icons, 0x10000, "<name of icon file>"
HKR, , NoMediaIcons, 0x10000, "<name of no media icon file>"

The AddReg section in this example defines two separate registry values and
corresponding icon files, one for the custom icon to display when media is 
present, and a second, "NoMediaIcons," which specifies an icon to be used to 
indicate the same device when no media is inserted.

The following example shows the registry entries for a Vid_0000&Pid_0000 
device and the dynamic-link library (DLL) files that contain the 
"media inserted" and "no media" versions of the icon.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\ 
 ** remove line break before using! ** 
  Vid_0000&Pid_0000\059B003112010E93\Device Parameters
Icons [REG_MULTI_SZ]= %SystemRoot%\system32\icon.ico
NoMediaIcons [REG_MULTI_SZ]= %SystemRoot%\system32\noicon.ico

In the INF file, icon files must be listed in the [SourceDisksFiles] 
section within the INF file, and copied to the user's system by either a 
CopyFiles directive or a CopyFiles section.

During driver installation, the INF entries listed in the example 
will be stored in the Device Parameters subkey within 
HKLM\System\CurrentControlSet\Enum.

Drivers or other code should never access or modify this registry key 
directly; instead, use one of the following APIs:

* From user-mode, use SetupDiCreateDevRegKey and SetupDiOpenDevRegKey.
 
( From kernel-mode, use IoOpenDeviceRegistryKey.
 

For information about the INF entries cited here, see the Device 
Installation Reference in the current Windows DDK.

2007-06-01

interesting utilities for NTFS - TimeStomp

The article Slashdot | New Anti-Forensic Tools Thwart Police pointed to a couple interesting things:

TimeStomp is a program for viewing and setting file system object date/timestamps on the NTFS file system.

Quick TimeStomp How-To from the Security Articles section at DataStronghold.com.

2007-05-26

Firefox disapearing scroll bar problem - clues

I've been using Mozilla Firefox 2.0.0.x under Windows XP and I have found a clue to the source of the problem that can be seen when resizing the Firefox browser window horizontally and the [Firefox] vertical scroll scroll bar - at some seemingly arbitrary point - disapears under the right edge of the shrinking window.

I tried to look this problem up using Google, but I didn't find much - just some forum posts on a forum I've already forgotten the name and URI of. However, there was a vital clue in the lengthy thread which didn't apply to my situation directly: the problem is triggered by some characteristic or behavior of the Status Line.

There was also some other mention of the Status bar in the threads I looked at. Someone complained that when they removed the weather.com widget from their status bar the problem cleared...

To make a long story short, I had installed a fairly large number of widgets ("add-ons") that took over various bits and chunks of the status line.

The point at which the vertical scroll bar disappears is the point at which the status bar reaches its minimum possible width based on the combined widths of whatever widgets you have installed on the status bar.

Simple, huh? Well, it took me a minute to work it out, so I thought I would share...

2007-05-17

multi-select tag search tool, the general case for a

I've been using "tags" and software applications that utilize and/or perform "tagging" operations for some time now, and while I am not an expert in the theory of operations concerning why we should all use tagging rather than the folder model of organization of information (I use both, and have caught myself trying to use both together), but I do have an observation having watched and done a certain amount of analysis of how I myself use tagging. That observation is this: I really, really want a tag search that will let me specificy multiple tags, rate on tag hits, and not include "keyword text searches" unless I specifically request it as a seperate function.

That's all. I know, I know: I'll have to build it myself. *sigh*

Tag the Bird for Thunderbird Concifuration Issue

========
 Issue:
========

The "Tag the Bird" (version 1.0) extension for Thunderbird
Portable version 1.5.0.10 (20070221) stores a hard-coded path
name in the Thunderbird configuration file.

This information is of interest only insofar as it affects the
working of "Tag The Bird" (and hence Thunderbird) in the
situation where Thunderbird has been moved from one location to
another via a simple Copy operation.


=============
 Background:
=============

Having installed Thunderbird Portable on a USB drive, and having
subsequently realized that the size of my Gmail inbox was
subsequently going to over-run my 1Gig USB stick, and that
having furthermore realized that Thunderbird would load more
quickly and just generally be more lively on my 2.8Ghz laptop if
I had the Thunderbird install on the internal hard disc, and
that I wouldn't have to keep up with a USB stick for my email if
it was on the drive - all these things [and others, like the
fact that Thunderbird stores its message archives in a
sub-folder with an arcane naming scheme under root
ThunderbirdPortable directory]taken together led me to simply
drag the Thunderbird folder from the USB drive to my WinXP
desktop and drop it in a spot where I can open it with a single
click any time I feel the need to use Thunderbird instead of
web-mail.


=========
 Detail:
=========

The config file that is changed is the same one that is opened
from within Thunderbird that is opened when the "Tools | Options
| Advanced | Config Editor..." button is pressed, presenting the
about:config page with a list of several hundred configuration
settings in Thunderbird [and extensions] - which settings may or
may not be accessible otherwise through the Thunderbird or
Extension GUI.

The name of the setting is "webmail.logging.comms.FileLocation"
[no quotes in the view of the file within Thunderbird].  The
listing of items in the about:config page is one item per line,
in alphabetical order.

The first part of the line is the name of the setting, and is
made up of identifiers [words] separated by dots [periods].
Lines that have been changed from their default values [I
believe this is the criteria] are shown in a boldface font.
Line items that have been created after the software was
installed may also be included in the bold facing, so
creation/modification time of the line in the file is somehow
used in the decision taken by the software as to whether the
line should be boldfaced or not.

Each line also contains a "Status" field [I see that "user set"
may be the status condition value which determines boldface of
lines], a Type field ["boolean", "integer", and "string" seem
the most common], and a value conforming to the type of value
shown in the "Type" field.

The value in question, here (webmail.logging.comms.FileLocation)
is a string value giving a fully qualified path name, apparently
a log file location.  The value on my system was

 F:\ThunderbirdPortable\Data\profile\extensions\{3c8e8390-2cf6-11d9-9669-0800200c9a66}\logfiles

Notes:

0.  The Thunderbird root directory in the string above path
    given above is "F:\ThunderbirdPortable\" - all file system
    objects [files] belonging to Thunderbird Portable reside in
    or below the Thunderbird root directory.  We will call this
    directory "ThunderbirdRoot" here, since the concept of the
    root directory as an environment for the operation of the
    software is important, here, to the understanding of the
    problem, and the crafting of a solution.

1.  Rhe string of hexadecimal digits in braces -
    {3c8e8390-2cf6-11d9-9669-0800200c9a66} - that is part of the
    string value shown above is [I believe] a so-called "GUID" -
    a "Globally Unique Identifier" - which uniquely identifies
    some piece of software or item of data [in fact, in many
    cases, a piece of binary executable code which is to be
    treated as data for one reason or another].

2.  {3c8e8390-2cf6-11d9-9669-0800200c9a66} identifies something
    that I find - by looking in the directory, and opening the
    standard-format install.rdf file at
  F:\ThunderbirdPortable\Data\profile\extensions\{3c8e8390-2cf6-11d9-9669-0800200c9a66}\

    is a Mozilla (and so Thunderbird, and so Thunderbird
    Portable) extension called "Tag the Bird" (obviously
    designed for Thunderbird specifically).  I installed this
    extension some time ago, but have not used it, since it
    requires that I log in to my Gmail account through the Tag
    the Bird software, and I haven't been comfortable doing that
    until/unless I have time to examine the sources or otherwise
    convince myself that this software is not phishing software
    designed to steal my account ID and password...

3.  The install.rdf file is an XML file that describes the
    initial configuration of a piece of software - in this case
    Tag the Bird.  RDF is an acronym for "Resource Descrition
    File" [perhpas "Format"] and is a standard extension to XML
    used by Mozilla [and - presumably - others].

4.  The RDF file must identify precisely - in this case using
    GUID, version number, program name, and author name - the
    software that the configuration description applies to.  For
    our purposes here, we just we looking for the program name
    and version number that goes with the GUID in the path name.


============
 Solutions:
============

Since setting entered into the about:config file points to a
sub-directory of the ThunderbirdPortable directory tree, and
since I had previously copied the directory tree entire, I can
assume that the directory pointed to by the current value stored
for webmail.logging.comms.FileLocation was valid at one time -
that is, the point at which the log [we presume] files were
copied from the existing subtree of ThunderbirdRoot on the USB
(F:) drive to the desktop folder on the laptop.

Furthermore, since we know that the desktop folder on the laptop
lives at "C:\Documents and Settings\USERNAME\Desktop" [where
USERNAME is the system user name of the user whose desktop we're
talking about], we can know that when we copied ThunderbirdRoot
from F: to the desktop, the the ThunderbirdRoot directory tree
was copied into C:\Documents and
Settings\USERNAME\Desktop\ThunderbirdPortable such that the
director on the C: drive is a snapshot of what was on the USB
stick at that time,

Therefore, the only critical path question in deciding to simply
change the about:config: setting to point to the path on the C:
drive is simply "Do we need to merge the changes that have been
made to the F: drive path [...]/logfiles into the new C: drive
path before we change the pointer?"

This is important in a couple ways:

1) the log files may be updating even as we make the change, if
Thunderbird is running at the time.  This means we should shut
Thunderbird down while we make the change, so we must get over
the angst of having to shut down a running program and just do
it...

2) We may just want to archive all the existing logs and start
new ones - we didn't know we could do that before, but now since
we know, perhaps we should.

3) We still don't know what physical file-system object [file]
Thunderbird is storing the about:config data in.  This is of
mild historical interest, since it's a point of hacker cred to
know which, amongst the many and varied configuration files
Mozilla uses, particular text file in which to make a particular
change to get the change to "work" in Thunderbird [or any of the
other mozilla softwares].  The reason this is [was] of interest
is simply because there was a time, back in the day, when
Mozilla was known as "Netscape", and the prefs.js file was
marked with a clear notice to the effect of "DO NOT CHANGE THIS
FILE IN YOUR TEXT EDITOR JUST BECAUSE YOU THINK YOU KNOW
JAVASCRIPT, YOU FILTHY TEXT-EDITING, UNRECALCITRANT ANTI-GUI
HACKER YOU FILTH YOU POND SCUM LINUX SUSPECT" which was noticed
by some few of us who were perhaps a bit too enamored of
tweaking hidden text files in an attempt to make our PCs love us
like real women having multiple orgasms.  We must find out if
she's a real blond, here.  Again.  Someone already knows. We
could look it up.  We don't care, we want to figure it out for
ourselves.

4) Okay, after that thrilling adventure, we're about ready to
make this config change to this Thunderbird plugin to make sure
there is no hard reference to a drive/file system which may or
may not be mounted and/or available when the software program in
question actually runs at any given time, at the command of some
as-yet-to-be-determined user.  Just gotta check a few more
things, first, and take another quick look at the current
program state.  Also need to shut down Thunderbird for a minute.

5) Shutting down Thunderbird:  We can figure out which file(s)
in the thunderbird are changed if we make a change to the config
right before we shut it down.  Since this knowledge will be of
use to us in determining which config file stores which config
setting [see above for why we want to know that], we will make a
"random" change to the about:config settings - we do this under
the assumption that all the settings shown in the about:config
dialog are in fact stored in the same file.  This may or may not
be the case, which will also be shown by this particular
[experimental] operation and its outcome.   We select a setting
from this dialog that we either a) don't care anything about,
but can observe, or b) must remember to change back to what we
want it to be, later - say, when (/if/) we come back to make
this change [the logging path] from within the GUI.  I say /if/
because we may just make the changes in the text file once we
know which file that is... we toggle the randomly chosen boolean
setting "wallet.enable" - don't forget to set it back.  Check
the time.  20:40

6) Back into WinXP now, we use the explorer mode of Windows
Explorer to navigate back up to the secret file stash of the
instance of Thunderbird that's running from the hard disc:
C:\Documents and
Settings\USERNAME\Desktop\ThunderbirdPortable\Data\profile

Note:  This is the same directory created when we copied the
ThunderbirdRoot folder off the USB drive.

7) By checking the time-stamps we find that the changed config
file is in fact our old nemesis from the profile folder:
prefs.js  - and if you don't think that filename is
extra-ordinarily hard to remember over time - that is: hard to
remember than "most filenames" - well then, that would mean that
my weed is superior to yours at least in function if not
necessarily in form.  Nothing personal.  We open the file.

8) Sure enough, there it is [see fig. 1.]


Figure 1:

/* Do not edit this file.
[...]
*/

... you scum sucking linux-lovers ... it may as well add.

9) Change it in the about:condig dialog to point at the new
directory [after you merge the files if you're that kind of
person, which we're, not; you should be able to figure out what
"it" means here from what was said above - if not, well, you
probably didn't make this far through here anyway, in that case
;)