bill's blog

Just another WordPress weblog

Browsing Posts in System Administration

When booting a UNIX-like OS its sometime necessary to see messages that are printed to screen as the operating system loads. Sometimes you may just want to make sure that a service is starting up correctly but it really comes in handy when trying to troubleshoot a start up issue.

Apple has conveniently hidden these start up messages! BUT You can seeing them on screen by holding down the Command and “v” keys (Command-V) immediately after powering on your Mac.

SO what if you always want to see these messages every time you boot your Mac?

To always boot OSX in verbose mode you’ll need to fire up a terminal session and issue the following command:

sudo nvram boot-args="-v"

If after a period of time you grow tired of seeing these messages scroll across your screen, you can disable verbose booting by issuing the following command:

sudo nvram boot-args=

Sure I have a bunch of apps that will do this… but every once in a while I need to get down and dirty. So here’s a quick way of doing a ping sweep from a command prompt.

$ for i in {1..254}; do ping -c 1 -W 1 192.168.1.$i | grep 'from'; done

Need to figure out what release of Ubuntu you’re running? Open a terminal window and type:

lsb_release -a

Here is an easy way to change the background image of your login screen on RHEL machines.

The normal background screen we get in our RHEL machines.

Now I want to change the background other than the default. Simple. Just upload a new file named background.png into the following directory

cd /usr/share/gdm/themes/RHEL

or are they taking the Flash war to another platform?

This is more useful that it looks…

find (filename) -user (username)

Let’s say that you need to find a listing of all files that are owned by root… transversing all directories beneath the one you are in currently.

find . -user root

will do the trick!

I found this while searching through YouTube… Very Interesting.

Hits a little too close to home! The YouTube gods are watching me!

There are many ways to create a DoS (Denial of Service) attack. The basics of a DoS attack is to overwehlm the resources of a host making it next to impossible to deal with legitimate service requests.

These attacks could be something as benign as downloading a youtube video on a network that doesn’t have the bandwidth to support such a download. To something a bit more devious such as a SYN flood attack where the attacker manipulates the way TCP setup and tears down its connection.

DoS attacks could take advantage of hardware (or lack there of)… software bugs… holes in the way some services work.

So the other day I was checking through my mail logs and came across a bunch of errors:

Oct 28 09:41:38 control imap[22672]: SQUAT failed

Oct 28 09:48:41 control imap[22746]: SQUAT failed to open index file

Doing a little bit of research I found that the SQUAT index file is used by email clients to accelerate the searching of a user’s mailbox. If the SQUAT file is not found then the mail client will still be able to search a user’s mailbox by looking through the actual messages themselves.

If you see these messages for IMAP in your logs, you can run the following command:

sudo -u cyrusimap /usr/bin/cyrus/bin/squatter -v

This will rebuild all SQUAT files for all users on the system.

Very often I work with files that I would rather not have recovered. From the Finder it’s simple a matter of going to the Finder pull-down menu and selecting:

Working in Terminal doesn’t mean that you can’t use this feature. Enter srm!

srm gives you slightly more control of the deletion in that you can specify how secure the erase is. While the Finder’s Secure Empty performs a 35-pass erase, srm has the options of doing both a single-pass or 7-pass US DoD compliant erase.

Basic examples: to erase a single file on could use.

srm -f -v /Users/billheese/Desktop/myfile.txt

If you want to erase whole directories the –r flag needs to be used.

srm -r -v /Users/billheese/Desktop/xyz