I have figured out how to revive mailman (1:2.1.11-11+lenny1), on Debian.
THE ISSUE:
When I kill my bin/createemail.sh, which creates a home directory, and adds the user to our global mailing list before the add_members call is completed.
THE SYMPTOMS:
Administrators are unable to log into the web interface. Any administrative binaries (ie add_members) hang on the command line.
THE FIX:
sudo /etc/init.d/mailman stop
cd /var/lib/mailman/locks
sudo rm *
sudo /etc/init.d/mailman start
Secret Ham
With a little side of applesauce...
Thursday, January 19, 2012
Friday, January 13, 2012
Root your box, and mount LVM partitions
I was teaching a friend how to root a box by adding:
init=/bin/bashto the kernel line in grub, and then wanted to show him how to install some apps from the command line. I had never done this with LVM partitions, and was surprised when I got the following error:
File based locking initialization failedDoh! I forgot to remount root read/write:
mount -o remount,rw /Finally, I was able to mount all my LVM partitions with:
lvm vgscanhaha! I'm getting rusty :P
lvm vgchange -ay
lvm lvs
mount -a
Wednesday, December 14, 2011
Migrating LDAP groupOfNames to groups table in Postgresql
I love LDAP! Well... I hate LDAP too... But, LDAP is not the directory service for my current position, so I am moving my groupOfNames to a Postgresql database. I usually do this with BASH, but thought I would dust off the PERL chops today and wrote this:
sqlinserts_from_ldif.pl:
I exported my LDAP group container to LDIF, then ran this PERL file against it to generate a SQL file I could upload into PostgreSQL.
See... I can't leave BASH altogether :)
sqlinserts_from_ldif.pl:
#!/usr/bin/perl
$f = 'webpos_groups.ldif';
# open file
open(FILE, $f) or die("Unable to open file");
$groupname = '';
while (<FILE>)
{
chomp;
$member = '';
if ( $_ =~ m/dn:/)
{
@gn = split(',', $_);
@gn2 = split('=', $gn[0]);
$groupname = $gn2[1];
}
if ( $_ =~ m/member:/)
{
@m = split(',', $_);
@m2 = split('=', $m[0]);
$member = $m2[1];
}
## print our sql
if ( $member ne '' ) {
$sqlinsert = '';
$sqlinsert = "INSERT INTO groups (groupid, member) VALUES ((SELECT loc_id FROM loc WHERE dept_name = '" . $groupname . "'), '" . $member . "');";
print "$sqlinsert\n";
}
}
# close file
close(FILE);
I exported my LDAP group container to LDIF, then ran this PERL file against it to generate a SQL file I could upload into PostgreSQL.
./sqlinserts_from_ldif.pl > groups.sql
See... I can't leave BASH altogether :)
Wednesday, November 30, 2011
undefined reference to `libnet_name2addr4'
I was getting the following error on Debian Squeeze while compiling the MS Windows Malformed IP Options DoS Exploit (MS05-019):
"> : undefined reference to `libnet_name2addr4'
> : undefined reference to `libnet_addr2name4'
> : undefined reference to `libnet_get_prand'
> : undefined reference to `libnet_getdevice'
> : undefined reference to `libnet_get_ipaddr4'
> : undefined reference to `libnet_get_hwaddr'
> : undefined reference to `libnet_init'
> : undefined reference to `libnet_build_udp'
> : undefined reference to `libnet_build_ipv4'
> : undefined reference to `libnet_build_ethernet'
> : undefined reference to `libnet_write'
> : undefined reference to `libnet_geterror'
> : undefined reference to `libnet_destroy'
"
The fix was to add -lnet to gcc command:
gcc -lnet 942.c
http://www.securityfocus.com/archive/89/390587/30/30/threaded
The fix was to add -lnet to gcc command:
gcc -lnet 942.c
http://www.securityfocus.com/archive/89/390587/30/30/threaded
Tuesday, November 22, 2011
nvidia-settings freeze on activating TwinView
I was able to fix this problem by upgrading to the newest LINUX X64 (AMD64/EM64T) DISPLAY DRIVER 290.10 from
http://www.nvidia.com/object/linux-display-amd64-290.10-driver.html
I'm running Debian Squeeze (amd64)
The bug is here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639009
And, for Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/nvidia-settings/+bug/873375
http://www.nvidia.com/object/linux-display-amd64-290.10-driver.html
I'm running Debian Squeeze (amd64)
The bug is here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639009
And, for Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/nvidia-settings/+bug/873375
Thursday, November 3, 2011
Mercurial - abort: error: Name or service not known
This was much simpler than the Google search was indicating... My network connection on the virtual machine was disconnected. haha!
Thursday, October 27, 2011
EMACS - TRAMP remote file access over SSH
TRAMP is the main reason that I left Eclipse and returned to EMACS. The Eclipse remote file access over SSH was clunky, (or possibly non-existent at the time). TRAMP is simple, (once I give you some tips), and is much faster than Eclipse. It also works on all platforms, (though you will need to use Cygwin on Windows).
First, I add the following to my .emacs:
This makes sure it is available to EMACS, (though it may not be necessary now that TRAMP is bundled in newer versions of EMACS), and sets the default method to SCP.
Second, you will want to set up key-based authentication as described in my post, "ssh authentication through public/private keypairs". This is not necessary, (and may be prohibited by your security policies), but it makes your remote file interaction seamless. If you don't setup key-based authentication, TRAMP will prompt you everytime that you login to the remote machine, so no worries.
Now, start EMACS, and hit C-x C-f and type the following and hit:
TRAMP will negotiate the SSH handshake, and prompt you for a password if you didn't setup key-based authentication. You should now see a listing of contents in your remote directory, (Dired). At this point, navigate and open/close and edit files just as if you were on your local machine. Very cool!
Don't forget to bookmark oft-used locations, (C-x r m)!
NOTES:
1. I always leave a local file open in EMACS, (usually .emacs), as sql-mode will try to search for psql on the remote machine when your current buffer is remote. Therefore, I switch to my local file before I start a new SQL-mode buffer.
2. There can be a short delay before the remote file is written if there are network issues, or if the SSH handshake takes longer than normal. Try reloading your web browser again if your changes didn't show. (Or, make sure that you saved your changes :) ).
3. I reload any buffer that is edited via a different program. For instance, I am working in EMACS, but visit the remote file using VIM in a regular shell session. Remember that the buffer is local and will overwrite any changes made locally to the file, if you save the buffer without reloading.
4. Some commands in Eshell don't work correctly with TRAMP, (ie grep). Therefore, I usually don't use Eshell for 'real' shell interaction with remote files. (Hence point #3).
First, I add the following to my .emacs:
;;;;;;;
;; tramp
(require 'tramp)
(setq tramp-default-method "scp")
;;;;;;;;
This makes sure it is available to EMACS, (though it may not be necessary now that TRAMP is bundled in newer versions of EMACS), and sets the default method to SCP.
Second, you will want to set up key-based authentication as described in my post, "ssh authentication through public/private keypairs". This is not necessary, (and may be prohibited by your security policies), but it makes your remote file interaction seamless. If you don't setup key-based authentication, TRAMP will prompt you everytime that you login to the remote machine, so no worries.
Now, start EMACS, and hit C-x C-f and type the following and hit
/scp:speeves@www.example.com:/home/speeves/
TRAMP will negotiate the SSH handshake, and prompt you for a password if you didn't setup key-based authentication. You should now see a listing of contents in your remote directory, (Dired). At this point, navigate and open/close and edit files just as if you were on your local machine. Very cool!
Don't forget to bookmark oft-used locations, (C-x r m)!
NOTES:
1. I always leave a local file open in EMACS, (usually .emacs), as sql-mode will try to search for psql on the remote machine when your current buffer is remote. Therefore, I switch to my local file before I start a new SQL-mode buffer.
2. There can be a short delay before the remote file is written if there are network issues, or if the SSH handshake takes longer than normal. Try reloading your web browser again if your changes didn't show. (Or, make sure that you saved your changes :) ).
3. I reload any buffer that is edited via a different program. For instance, I am working in EMACS, but visit the remote file using VIM in a regular shell session. Remember that the buffer is local and will overwrite any changes made locally to the file, if you save the buffer without reloading.
4. Some commands in Eshell don't work correctly with TRAMP, (ie grep). Therefore, I usually don't use Eshell for 'real' shell interaction with remote files. (Hence point #3).
Subscribe to:
Posts (Atom)
©2006 Shannon Eric Peevey
