Perlboy"/>

Seekbrain.com

Jump to content.

Cool command

Well you learn something new every day. For a long time I’ve been simply ps’ing for information pertaining to processes but it turns out there’s a cool command that’s related:

pstree

It creates output like this:

[stuart@iapetus ~]$ pstree
init─┬─acpid
├─atd
├─auditd
├─automount
├─bonobo-activati
├─cannaserver
├─clock-applet
├─crond
├─cups-config-dae
├─cupsd
├─2*[dbus-daemon]
├─dbus-launch
├─2*[dhclient]
├─eggcups
├─events/0
├─evolution
├─evolution-alarm
├─evolution-data-
├─evolution-excha
├─firefox───run-mozilla.sh───firefox-bin
├─gaim
├─gam_server
├─gconfd-2
├─gnome-keyring-d
├─gnome-panel
├─gnome-settings-
├─gnome-terminal─┬─bash
│                ├─2*[bash───ssh]
│                ├─bash───su───bash
│                ├─bash───pstree
│                └─gnome-pty-helpe
├─gnome-vfs-daemo
├─gnome-volume-ma
├─gpm
├─hald─┬─hald-addon-acpi
│      └─hald-addon-stor
├─hcid
├─iiimd
├─khelper
├─2*[kjournald]
├─klogd
├─krfcommd
├─ksoftirqd/0
├─kswapd0
├─kthread─┬─aio/0
│         ├─ata/0
│         ├─hda_codec/0
│         ├─kacpid
│         ├─kauditd
│         ├─kblockd/0
│         ├─khubd
│         ├─kmirrord
│         ├─kseriod
│         ├─2*[pdflush]
│         ├─scsi_eh_0
│         └─scsi_eh_1
├─mDNSResponder
├─mapping-daemon
├─metacity
├─6*[mingetty]
├─mixer_applet2
├─nautilus
├─nifd
├─notification-ar
├─ntpd
├─pam-panel-icon───pam_timestamp_c
├─portmap
├─prefdm───gdm-binary───gdm-binary─┬─X
│                                  └─gnome-session───ssh-agent
├─rhn-applet-gui
├─rpc.idmapd
├─rpc.statd
├─sdpd
├─2*[sendmail]
├─skype
├─smartd
├─sshd
├─syslogd
├─udevd
├─wnck-applet
├─xchat
├─xfs
├─xinetd
└─xscreensaver
[stuart@iapetus ~]$

Cool huh? 🙂

Have a good day!

Stuart

Begg-Smith a spam king

Well,

It was suss to begin with that Begg-Smith, of Canadian origin, won an Olympic Gold for Australia but now with the additional focus on his activities it’s been revealed Dale Begg-Smith made his money through underhand popup, trojan and keyloggers. Read more from the “Spam King” man at O’Reilly’s here.

Stuart

Code Snippet

Command to find all PHP rpms and print on one line:

rpm -qa | grep ‘^php-‘ | perl -pe ‘s/\n/ /g;’

Combined command to find all PHP rpms and remove them:

rpm -e `rpm -qa | grep ‘^php-‘ | perl -pe ‘s/\n/ /g;’`

Have fun!

Stuart

Saslauthd & Postfix

This is mainly posted for those people searching on Google.

I just setup a Postfix install with Saslauthd authentication (to an LDAP backend). Postfix refused to do TLS authentication stating (in the maillog):

warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory

This message isn’t at all helpful in actually TELLING us how to fix this problem. However, it turns out that the build of Postfix Redhat ships looks for Saslauthd’s socket in /var/state/saslauthd while the Redhat shipped Saslauthd version sets itself up in /var/run/saslauthd. Changing the SOCKETDIR (/etc/sysconfig/saslauthd) to /var/state/saslauthd fixes the Postfix issue.

To get testsaslauthd to work I also removed the now deprecated /var/run/saslauthd directory and symlinked it directly to /var/state/saslauthd

Hopefully this will be useful to another frustrated admin like myself.

Stuart

Home Network Setup, Part 5

Ok,

This is the fifth part of my guide on how to setup a home network. If you’ve only just dropped in I’d recommend you have a quick read over parts 1, 2, 3 & 4. Throughout this guide I’ve exclusively used CentOS4 and I’ve assumed it’s a basic clean install.

I cover the following topics in this part:

  • POP3/IMAP Server
  • Outbound SMTP Server
  • Local mail pull
  • Web based mail access
  • Dynamic Virtualhost Access

(Read on …)

Next Page »