mikeage.net Logo
mikeage.net/tag/linux/

mikeage.net @ ח׳ תשרי תשע״ה

Posts Tagged ‘Linux’

Working Portable Ubuntu with Jaunty (9.04)

‍‍כ״ב תמוז תשס״ט - Tuesday, July 14th, 2009

I recently discovered (courtesy of Ubuntu Geek Portable Ubuntu, a Portable Windows application which uses Cooperative Linux [version 0.7.3] to run a Linux kernel as a Windows process! I was very pleased, but found a few small glitches in the installation and upgrade from Ubuntu 8.04 LTS to the latest Jaunty 9.04 release which I'll document here.
(more…)

PingTunnel Improvements: Win32 & Syslog

‍‍ט״ז טבת תשס״ט - Monday, January 12th, 2009

For anyone interested in clever networking hacks, I strongly advise checking out ptunnel. This software package allows you to tunnel any TCP (such as SSH) over a ICMP (i.e., ping). Since even the most restrictive firewalls (whether corporate, Wifi (don't steal...) or other) usually let ICMP traffic through, this little piece of code can let you access anything you want.
(more…)

Converting between DOS and Unix

‍‍ז׳ מנחם אב תשס״ה - Friday, August 12th, 2005

Quick Overview

DOS (and Windows) use different formats to mark the ned of a line in a text file. DOS uses a CR-LF, while Unix just uses a LF. There are many ways to switch between the formats.. some common ones are below

Explicit Programs

The programs dos2unix and unix2dos provide a simple way to switch between the two formats. These are also known on some systems as todos and fromdos.

tr

tr -d '\15\32' < dosfile > unixfile

AWK

DOS to Unix
awk '{ sub("\r$", ""); print }' < dosfile > unixfile
Unix to DOS
awk 'sub("$", "\r")' < unixfile > dosfile

Perl

DOS to Unix
perl -p -e 's/\r$//' < dosfile > unixfile
Unix to DOS
perl -p -e 's/\n/\r\n/' < unixfile > dosfile

Enjoy.

Single User Mode in Linux

‍‍ז׳ מנחם אב תשס״ה - Friday, August 12th, 2005

Quick Overview

By default, Linux does not password protect the booting into Single User mode. This can be helpful (if you forget the root password, you can boot to single user, change the password, and restart) and dangerous (so can anyone with physical access to the machine. Read below to see how to use this, and how to prevent it

Under LILO

Exploiting

When prompted with the LILO: prompt, type linux single (or whatever kernel you want, followed by the word single). To see a list of available kernels, press TAB. If you have a graphical menu, type CTRL-X to switch to a text prompt first

Preventing

Add password=XXXX to your lilo.conf file. Don't forget to rerun lilo afterwards

Under Grub

Exploiting

When you select the boot image, press e to edit the currentline. The second (usually) line should say something like kernel <drive>/vmlinuz root=<partition> <otherstuff>. Add single to the end of this line, and boot.

Preventing

Grub stores MD5 encrypted passwords in the grub.conf file. First, run
grub-md5-crypt, which returns the MD5 hash of a given password. Then, open up grub.conf, and add the line password --md5 <output-from-grub-md5-crypt>. Unlike LILO, there is no need to do anything after changing the config file; changes are saved automatically.

Enjoy.

Quick Map
Content +
Personal +
Archives +
Site Stuff +
RBS Weather +
Search +
Recent Images
Visitors
Clustermap

Valid XHTML 1.1!
Printer Friendly Page
 

Last Modified: September 04, 2006 @ 02:11 CST

Memory(TRUE): 1572864/1572864
Memory(FALSE): 1446664/1477572