Posts Tagged Linux

LCOD – 7.24.10 – Get su to respect /etc/security/limits.conf

Get su to respect settings in /etc/security/limits.conf

Click to continue reading “LCOD – 7.24.10 – Get su to respect /etc/security/limits.conf”

, , ,

No Comments

LCOD – 4.12.10 – Quick Mysqlreport to e-mail setup

This will be a quick install to setup your server to e-mail you daily mysql reports using the cool mysqlreport application at hackmysql.com

Click to continue reading “LCOD – 4.12.10 – Quick Mysqlreport to e-mail setup”

, , , , , , , ,

No Comments

LCOD – 6.18.09 Useful command line grepping (grep!)

There are a few regular expressions I find myself using all the time via grep on the command line. Here are a few, along with a few frequently used commands I can’t live without.

Find the non comment parts of a file.
(Useful if you want to see or compare the active parts of a config file.)
Most Unix config files use # as a comment tag, indicating everything after the # is a comment.
grep ‘^[^#]‘ filename.conf

To break this down, first we have grep , which is a command line program to find lines that match a regular expression pattern, and display them. The single quotes indicate that we’re passing the entire section enclosed in single quotes as the first argument, which doesn’t matter as much in this example, but it’s good to practice, so when you have a space or some other character, you won’t be confused when your shell interprits it. The regular expression used is
^[^#]
Which is slightly trick, as far as regular expressions go, for only one reason; the character ^ is used twice, with different meanings.
Normally the ^ is regular expression for the start of a line, and we use it here as this, the first time. The second time, inside the brackets, it means NOT.
Brackets in regular expressions are like a giant OR statement, with every non-escape character (like the forward slash / ) as a possible match. This can hang people up when they expect [bob] to match the full word bob, instead of just the first b.
Then we have the #, which just matches our comment character, #.
Then the closing bracket, since we’re not doing any other options.
The net result of this is to match any line that has a # right after the start of the line.

To do the same thing on a config file that uses a ; as a comment indicator:
grep ‘^[;]‘ filename.conf

OR, to be even trickier, you could just add the # and ; in the same set of brackets, like
grep ‘^[;#] fliename.conf

Note the order of items inside the bracket doesn’t really matter in this case.

Next, often times I have a file with a bunch of empty lines in it, and I want to quickly get rid of them all. To do this I use a combination of a simple grep and a output redirect.

grep . filename
The . character is a regular expression match for any character, but it won’t match empty lines (the regular expression ^$ does though).
To get this into the file, first redirect it to a new file, then move the file back.
grep . filename > newfile
mv newfile filename

or, if you want to sort, just run
sort newfile > filename

perhaps you now want to just get the unique lines
uniq newfile > filename

Of course, I should mention the very obvious ones.
Grepping for words in files.

grep Word filename

Note that grep is case sensitive, but you can turn that off with the -i flag.

grep -i word filename

There is an infinite amount of uses for grep, but the foundation for grep/sed/awk/perl use for patterns is regular expressions. More than any single book I’ve read about techonlogy, the O’Reilly book “Mastering Regular Expressions”, by Jeffrey Friedl has helped me the most in my IT career. I highly suggest you buy and read it.

, , , ,

No Comments

LCOD 2.23.09 Setup Polycom Soundstation 6000 w/Asterisk

Setup/install notes, Polycom Soundstation IP 6000 with Asterisk 1.4

Have tftp setup, in this we use /tftpboot as the main tftp folder, and it’s world readable/writable, (LIMIT ACCESS VIA IPTABLES/FIREWALL/SOMETHING)
Have a dhcp server setup that’s giving out the normal things for SIP phones,
option tftp-server-name “[ASTERISK-SERVER-IP";
option time-offset -23400; # Mountain Standard Time
option ntp-servers 10.0.2.1;

Have asterisk up and running, make a SIP extension/entry like you would for a normal SIP client, although don't use type=friend, use type=peer
like this for extension 101, username 101, password temp
[101]
type=peer
username=101
secret=temp
host=dynamic
context=[your default context for phones]
qualify=150
accountcode=[optional accounting code]
mailbox=[extension for mailbox]

reload asterisk’s sip module
asterisk -vvvngrd
asterisk*>CLI>sip reload

Setup the Polycom:
download the latest rpm for firmware for trixbox from

http://yum.trixbox.org/centos/5/RPMS/

this time it was:

http://yum.trixbox.org/centos/5/RPMS/firmware-polycom-3.0.1-2.noarch.rpm

unzip this, put the tftpboot files into your tftpboot dir, put the setup-polycom.rpm_tmp_update in
/usr/local/sbin/setup-polycom.rpm_tmp_update

check which NIC your asterisk interface system is on and run
/usr/local/sbin/setup-polycom.rpm_tmp_update

(my ntp server doesn’t like our SIP clients sntp requests, so I use time.nist.gov and nat that outbound for the phones)
edit /tftpboot/server.cfg
change
tcpIpApp.sntp.address=”192.43.244.18″

Now download the latest version of the sip firwmare from polycom

http://downloads.polycom.com/voice/voip/sp_ss_sip/spip_ssip_3_1_2_release_sig_combined.zip

unzip and put all the files in /tftpboot/

edit /tftpboot/000000000000.cfg
add server.cfg on the CONFIG_FILES line, so mine looks like this

note there were 2 other application lines but i left them the same as they looked like they were for SPIP300/500′s

now, per conference phone, copy the /tftpboot/000000000000.cfg to /tftpboot/[phone mac address].cfg
the mac address is also the serial number of the phone (on the back!)
I’m not sure if it’s case sensitive but I did all lower case and it worked, tail your tftp servers logs to see what’s getting requested.

edit the /tftpboot/[phone mac address].cfg
on the line where you added server.cfg, add a custom config for this device, calling it whatever you want, so if you wanted, call it conference1.cfg, your application line would look like:

now edit that file /tftpboot/conference1.cfg (or whatever you called it)
username and password should match what you put in asterisk’s sip.conf
it should look something like this

< ?xml version="1.0" encoding="UTF-8" standalone="yes"?>


reg.1.address="101"
reg.1.label="101"
reg.1.auth.userId="101"
reg.1.auth.password="password"
reg.1.lineKeys="6"
/>

I mostly followed the directions from here (I am using a self compiled asterisk, version 1.4.19.1 on Gentoo Linux, not trixbox)

http://www.sureteq.com/asterisk/polycom.htm

and used the following links for reference:

http://www.voip-info.org/wiki/view/polycom+trixbox

http://www.voip-info.org/wiki/view/Polycom+Phones

http://www.polycom.com/support/voice/soundstation_ip_series/soundstation_ip6000.html

http://blog.voipsupply.com/new-products/polycom-sip-firmware-31-released-whats-in-it-for-me

http://blog.voipsupply.com/voip-software/unleash-your-polycom-soundpoint-ip-phone%e2%80%a6introducing-the-polycom-productivity-suite-package

http://yum.trixbox.org/centos/5/RPMS/repodata/repoview/firmware-polycom-0-3.0.1-2.html

http://www.voip-info.org/wiki/view/Asterisk%40Home+Handbook+Wiki+Chapter+7#7224HowtouseProvisioningCentralBootServe

http://www.asteriskvoipnews.com/polycom/polycom_releases_soundstation_ip_7000_and_ip_6000_conference_phone.html

, , ,

No Comments

LCOD – 8.3.08 Get around annoying reboot during fdisk

Do you ever try to reformat / repartition disks and Linux complains the kernel is still using the old table and you have to REBOOT (a sin on any *NIX) to fix this?
The error is “WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.”

This annoys me, what was happening on my Ubuntu 7.10 computer was I had a disk that used to be Linux and I put it into a USB / Firewire enclosure and fdisk’d it and then formatted it, but the automounter sees the partition exists as soon as the kernel rereads the partition table and mounts it. This isn’t safe or a good idea really, so, if you’re going to nuke a disk you should zero out any previous partitions by nuking the master partition table.

THIS IS A POTENTIALLY DANGEROUS OPERATION, YOU PROCEED AT YOUR OWN RISK, I WILL NOT ASSUME LIABILITY FOR LOST DATA OR ANY DAMAGES.

Ok, so make 100% absolutely sure you know the drive letter you’re getting with something like

dmesg | tail

and you’ll see something like

sd 18:0:0:0: [sdf] 488397168 512-byte hardware sectors (250059 MB)
[3010413.606563] sd 18:0:0:0: [sdf] Test WP failed, assume Write Enabled
[3010413.606568] sd 18:0:0:0: [sdf] Assuming drive cache: write through
[3010413.607559] sd 18:0:0:0: [sdf] 488397168 512-byte hardware sectors (250059 MB)
[3010413.608807] sd 18:0:0:0: [sdf] Test WP failed, assume Write Enabled
[3010413.608811] sd 18:0:0:0: [sdf] Assuming drive cache: write through
[3010413.608815] sdf: sdf1 sdf2 < sdf5 >
[3010413.651837] sd 18:0:0:0: [sdf] Attached SCSI disk
[3010413.651880] sd 18:0:0:0: Attached scsi generic sg5 type 0
[3010415.111787] kjournald starting. Commit interval 5 seconds

Now run this (as root), substitude sdf for the device you found. BE WARNED that if Linux didn’t see your disk when you just plugged it in, you may be seeing the detection of an actual file system disk. The best way to tell is to run tail -f /var/log/kern.log (or /var/log/messages or something where the kernel logs, depending on your distribution of Linux)

fdisk -l /dev/sdf

This showed me

Disk /dev/sdf: 250.0 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000969e0

Device Boot Start End Blocks Id System
/dev/sdf1 * 1 30024 241167748+ 83 Linux
/dev/sdf2 30025 30401 3028252+ 5 Extended
/dev/sdf5 30025 30401 3028221 82 Linux swap / Solaris

Now I check df -h and see that Ubunu already mounted /dev/sdf1 on /media/disk
So I (as root) unmount it with
umount /dev/sdf1

Now I zero the partition table, THIS CAN TOTALLY MESS UP YOUR DISK IN AN UNRECOVERABLE FASHION, SO BE REALLY REALLY REALLY SURE YOU HAVE THE CORRECT DISK DEVICE NODE. IF YOU ARE UNSURE DO NOT PROCEED.
(More info about the master boot record on the wikipedia article here. )

dd if=/dev/zero of=/dev/sdf bs=512 count=1

Now, proceed with creating the partition(s) and formatting
fdisk /dev/sdf
select n,p,enter,enter,w
mkfs.ext3 /dev/sdf1

, , ,

No Comments

LCOD – 5.17.08 – Locking down ssh access

In light of an increase in ssh attacks , vulnerabilities and scans I am writing this guide to help you keep unwanted people from connecting to your server via SSH.

If you have generated any of your SSH keys on a Debian or Ubuntu system they are likely very vulnerable to guessing, e.g. someone could login to your box if they know the name of one of your users that you allow in via ssh within 30 minutes!
See here for more info: http://metasploit.com/users/hdm/tools/debian-openssl/

This applies to any PAM enabled Linux (or other PAM-enabled *nix like OS)

This guide will walk you through configuring your OpenSSH server to only allow public key authentication and limit that to specific users and groups. Errors in this guide or mistakes or differences in system configurations could lock you out of your own systems, be very careful and do not proceed unless you understand and assume the risk you are taking.

I assume no responsibility for YOUR actions. This guide was tested on Ubuntu 7.10 and fairly recent Gentoo system.

1. Limit SSH access to public/private keys only, deny X11 and TCP forwarding, and deny root ssh access
Step 1 Discussion:
Public/Private keys are not necessarily more secure than passwords, but it’s harder to guess a private key, and if your users put passwords on their keys then an attacker must have or guess 2 things, the key and its password.

The root user is GOD on almost every Linux/*nix system out there, and nobody should be able to login directly as root remotely. In addition it’s a very common user, on almost every Linux/*nix system.

TCP and X11 forwarding is one of the coolest features of an ssh server. Unless you want people to be able to use your ssh server like a full access vpn to your local network, or any other network (bounce their attacks through your server), then you want this disabled. And X11 forwarding is great, but I never run an X11 server on something that is a “production” environment. If something requires an X11 server, like Oracle, then I run vncserver and allow ssh port forwarding so people can connect via ssh. I make sure to have full deny by default firewalls on all machines like this, limiting outbound access.

Step 1 HOWTO
Edit /etc/ssh/sshd_config
Make sure the following lines are not commented out, and don’t say something different

Protocol 2
PermitRootLogin no
UsePAM yes
PasswordAuthentication no
PubkeyAuthentication yes
RSAAuthentication yes
PermitEmptyPasswords no
ChallengeResponseAuthentication no
AllowTcpForwarding no
X11Forwarding no

2. Create an ssh remote users group and add users to it who need remote ssh access
Step 2 Discussion:
The main reason I want to limit who has remote ssh access is because there are frequently system accounts or other automatically created accounts that I don’t want to have to monitor to make sure the installer didn’t just make a new user with a simple password or key. I want to have the default be nobody can ssh, and then I’ll add ssh permissions to users who need it.

Step 2 HOWTO:
Let’s call our remote ssh users list rsshusers, we create it with the command
groupadd rsshusers
Now let’s say we have a user named mikey already setup, let’s add him to our new rsshusers group, with the command
usermod -a -G rsshusers mikey
Do this for every user you want to have ssh in remotely. Note that if you’re used to logging in remotely as root and are going to stop doing that, make sure you user can su to root with the command su.
Login as the user, run
su
Put in your root password, if it accepts it and you are root (run whoami to verify) then you’re good to go. If it fails to let you su and you’re sure you have the password right you may need to be in the wheel group to us (default on FreeBSD and Gentoo).
Back as root run the following command to add your user (again, mikey in this example) to your wheel group.
usermod -a -G wheel mikey

Now we’re going to edit 2 files to limit remote ssh users to the group we made called rsshusers.
First, edit /etc/pam.d/sshd (this was ssh on my Debian/Ubuntu systems)
Add the line
account required pam_access.so

This enables access accounting based on the /etc/security/access.conf file, which is the next one we are going to edit.
On both my Gentoo and Debian system this file had every line commented out.
At the end I added the following lines.

-:ALL EXCEPT root mikey:LOCAL
+ : (rsshusers) : ALL
- : ALL : ALL

Initially I tried to use a group like @rsshusers, however this didn’t seem to work, but () designates explicitly a group.

Restart sshd
Gentoo:
/etc/init.d/sshd restart
Debian/Ubuntu:
/etc/init.d/ssh restart

Now, without closing your root terminal, open a new one and make sure you can ssh in as mikey, and su to root.

Assuming everything went well you could try ssh’ing in as another user whose public key is correctly in place, but who isn’t in the rsshusers group.

Related links:

PAM:

http://devmanual.gentoo.org/tasks-reference/pam/index.html

http://linuxdocs.org/HOWTOs/User-Authentication-HOWTO/x101.html

http://tldp.org/HOWTO/User-Authentication-HOWTO/

http://www.faqs.org/docs/Linux-HOWTO/Secure-Programs-HOWTO.html

OpenSSH:

http://www.openssh.com/

http://thinkhole.org/wp/2006/10/30/five-steps-to-a-more-secure-ssh/

http://www.cyberciti.biz/tips/rhel-centos-linux-install-configure-rssh-shell.html

http://geekzine.org/2007/09/28/easy-sftp-and-chroot-sftp-with-scponly/

Misc:
Securing RedHat

http://help.unc.edu/?id=1859

Debian SSLkeys

http://wiki.debian.org/SSLkeys

Links in post:

http://www.securityfocus.com/news/11518

http://metasploit.com/users/hdm/tools/debian-openssl/

, , , ,

No Comments

LCOD 11.14.07 – Quick RAID check script for cron

This is a quick script that will let you run the new raid checks, or repair, or pause a running raid check. It doesn’t do e-mails or anything, and from what I read on this thread it’s something mdadm needs to be set to watch for. I ran the check on a RAID and received no output, so I guess it was ok?

I will update the script as I find out more. I’d like to add a simple escalation from check to rebuild? (I think it does this anyways), and an e-mail status report, or even a syslog call saying I ran all things look good.


#!/bin/bash
###############
# Quick script to use raid functionality
# Author : Jon Zobrist < jon@bluesun.netThis e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
# http://www.bluesun.net/
# License : LGPL
# Version : 1.0
# Date : 11.14.07
# install/notes:
# put it somewhere, /root/bin/ is where I prefer
# put this in your root crontab to run from cron monthly
# @monthly /root/bin/checkraids check > /root/logs/cron.log 2>&1
###############

case "$1" in
check)
for raid in /sys/block/md*/md/sync_action
do
echo check > $raid
done
;;

repair)
for raid in /sys/block/md*/md/sync_action
do
echo repair > $raid
done
;;

pause)
for raid in /sys/block/md*/md/sync_action
do
echo idle > $raid
done
;;

status)
for raid in /sys/block/md*/md/sync_action
do
echo "******************************"
echo $raid `cat $raid`
echo ""
done
;;

*)
echo "Usage : $0 check|repair|pause|status"
;;
esac

, , , , , ,

No Comments

LCOD – 6.6.07 – Simple SSH remote command execution

ssh -X -C -f HOSTNAME PROGRAM

Of course you need to be running an X server (Linux/*BSD Desktop) on your client, and you need to have
ForwardX11 yes
or
ForwardX11Trusted yes

in your CLIENT’s /etc/ssh/ssh_config file
and
X11Forwarding yes
in /etc/ssh/sshd_config
on the SERVER.

, , , , ,

No Comments

Linux on my zt1150

How to install Linux on a Pavilion zt1150
Need help with Linux? Go to the Linux Command of the Day site (LCOD on left menu)

updated 5/31/07
If you want to install Linux on any computer for desktop/laptop use I recommend
you download Ubuntu and install that. It’s much easier and pretty much everything works.
http://www.ubuntu.com/

updated 4/27/04

I found another site with a zt1000 series laptop today while surfing for info, here’s a link
updated 4/21/04
Index:

Kernel 2.6.1
Kernel 2.6.0
What works/doesn’t work
Major Issues
Install Gentoo/RedHat/Mandrake notes
Wireless howto
Config/kernel files
All links from page summary
Old zt1150 page
My Linux Command of the Day site

Kernel 2.6.1
My 2.6.1 HP ZT1150 Kernel Config file
I just upgraded to 2.6.1 today (1/23/04) to see if my touchpad started working normally again, no luck. So I did some surfing, and found a Synaptics mouse driver, installed it and am happily using my scrolling and tap again. Synaptics Driver . One note, their documentation says you need to set CONFIG_MOUSE_PS2_SYNAPTIC set in the kernel config, and I can’t find this option. If I set it and rebuild (running genkernel) when I load the edited config file, then save it out somewhere else, it drops this option. I’ve got a stock 2.6.1 vanilla kernel, downloaded from kernel.org.
Their documentation online isn’t as complete. I downloaded the tar.gz file and after untarring it (tar -zxvf filename.tar.gz), I went into the synaptics directory created and looked at the INSTALL file. Basically you make, make install from the dir. Then edit /etc/X11/XF86Config-4 commented out my device section, added the device section straight from the INSTALL doc, and added a Load “synaptics” at the bottom of my other Loads in the same file. Here’s the Load line
Load “synaptics”

And here’s the Input section
Section “InputDevice”
Driver “synaptics”
Identifier “Mouse0″
Option “Device” “/dev/psaux”
Option “Protocol” “auto-dev”
Option “LeftEdge” “1900″
Option “RightEdge” “5400″
Option “TopEdge” “1900″
Option “BottomEdge” “4000″
Option “FingerLow” “25″
Option “FingerHigh” “30″
Option “MaxTapTime” “180″
Option “MaxTapMove” “220″
Option “VertScrollDelta” “100″
Option “MinSpeed” “0.02″
Option “MaxSpeed” “0.18″
Option “AccelFactor” “0.0010″
Option “SHMConfig” “on”
# Option “Repeater” “/dev/ps2mouse”
EndSection
Notice that my Identifier is “Mouse0″ You may have something else, like “Mouse1″ or “FrankenMouse”, or whatever, this just needs to match what you have on your InputDevice line, like mine says
Section “ServerLayout”
Identifier “Anaconda Configured”
Screen 0 “Screen0″ 0 0
InputDevice “Mouse0″ “CorePointer”
InputDevice “Keyboard0″ “CoreKeyboard”
EndSection
I uploaded a new screenshot , just for kicks.. I’ve started using Gnome on my laptop for some reason.. I think originally it was sound worked better, but I think I leave it on becuase it make my laptop feel more structured and more like a tool with a bunch of buttons to press. Not what I want on my desktop (enlightnment still on there), where I want free form, big mess of open terminals/documents/browsers.

One problem that I’ve always had, even with Windows laptops, is that if you get too much static buildup walking around and touch the touchpad before you’ve grounded yourself you lose your mouse control. In Linux I hit CTRL+ALT+F1 then CTRL+ALT+F7 to get out of X and back. This usually does the trick. But it is annoying. And since I’ve installed my synaptics driver this has happened once, and the change screen trick didn’t work, I’ve lost my mouse!

Kernel 2.6.0 I upgraded to kernel 2.6.0, everything that was working still works with 1 exception. My touch pad mouse no longer allows taps, and the scroll bar no longer scrolls. I did some brief research and found that this is an issue with 2.6.0, and I’m going to try 2.6.1 and see how it goes, I’ll report here. No updates because I’ve just been using my laptop without any problems. My Orinoco card finally gave out on me, the end is a little bent, so I threw in my 200mW card that I used to use in my DSL access point, this is the most powerful 802.11b card I’ve ever used. I 95-100% signal all over my house.

What works/doesn’t work
The things I have currently working are; sound, Xwindows (1024x768x32bpp), built in Ethernet, pcmcia Orinoco wireless LAN card, ACPI/battery status/auto power off on shutdown, USB, the touchpad with the scrollbar (reason enough to buy an HP).
I haven’t tried these things: firewire, video out, the special buttons, the built in modem.
For me there are no issues with Linux on this laptop right now that I’m working on, I’m considering trying the modem since it is a laptop and having modem access while roaming seems like a good thing. I always plan to try firewire in the near future.

Major Issues
Without a doubt the single largest issue I had was configuring and getting my sound to work. Finally, the ACPI kernel fixed it and I get sound. I wouldn’t say it’s problem free (I get occasional crackling in some sounds, not mp3′s but system sounds), but it’s very usable. You can find the ACPI kernel project here and the downloads page here. The ACPI kernel allowed me to view my battery information in /proc/…(add full path), as well as enable the laptop to power off automatically on shutdown.
The only other issue I still occasionally experience is the instant turn off, this only happens if the laptop is on a surface that doesn’t dissapate heat well. I’ve got some Duplo blocks and the laptop has never just powered off while it’s been on it’s duplo blocks. This leads me to think it’s heat related. It has run processor intensive tasks for long periods of time on the blocks with no instant power offs (such as installing gentoo).

Installing Gentoo/RedHat/Mandrake notes
Gentoo:
First a word about Gentoo. Gentoo is source based distribution. Here is their about doc. Gentoo brought to Linux what I missed from FreeBSD, a good ports system. I know Debian has had apt for a while, but I never tried it, and I plan to. For those of you who haven’t heard of ports, it’s basically an easy interface to getting new software, while maintaining dependencies and still building from source. The Gentoo ports system is great, it has most software you need. Once you’re up and running in Gentoo you simply emerge packagename to install software. The Ebuild system calculates dependencies, downloads all necessary files and builds them using your make flags. Which brings up another nice thing about Gentoo. It’s fast, anyone who has run RedHat then switched to Mandrake has seen a small sample of what processor optimizations can do for Linux. RedHat is built for i386, the lowest common denominator for processor optimizations. RedHat will run on any i386 platform. Mandrake, on the other hand, is built using i586 optimizations, and therefore requires a pentium level computer to run. Gentoo allows you to specify your own optimizations, they can be pentium4, pentium3, athlon xp, athlon, i686, i586, whatever you want. I use pentium3 for my laptop, so my entire system from the kernel to the simple commands is optimized for a pentium3 processor. I also used the flags to break compatability with other processors (I’m not planning on moving my programs from my laptop to another computer ever.) This means Gentoo is FAST. For a laptop, where speed is generally an issue, this means much more than on a desktop. But I run Gentoo on several desktop systems and it’s fast there too.
To install gentoo I did a stage 1 install, following the x86 installation documents pretty much straight through. I know many people view Gentoo as a hard core Linux, but it’s a great way to learn what’s really going on with your system. I recommend it for people who are comfortable compiling a kernel.
The first couple times I installed Gentoo on various machines I tried some new things, such as the recommended meta log, and the various cron daemons. I’m now back to syslog and vcron (old standbys), since I frequently tail -f logfiles to watchs things happen.
RedHat(7.3):
The RedHat install went very smoothly, of the standard binary distributions I’d say it’s the most recommended for the HP zt1150. I started with Linux reiserfs on the RedHat boot line so I could use Reiserfs. The only real reason I use reiser over ext3 , JFS, or XFS is I once had a server run out of inodes and reiser has 4Billion possible inodes per partition. Reiser’s home page is here if you’d like to read more about it. AFAIK XFS is the fastest file system ever, but suffers fragment limitations and inode limits like other file systems, for example if you write a 500 byte file and your inodes are 4K each, then you’ll use 4K of actual disk to store that file, as opposed to reiser where you’ll use 500 bytes. I partitioned my disks with one swap and the rest on /. I think it’s a waste to split your partitions more unless you need some other logical type seperations, like you want seperate quotas for a user’s mail and web space, which doesn’t noramlly apply on a laptop.
If you’re a newbie to Linux or would just like to run a standard binary distro then I’d recommend RedHat, and install a new kernel with the ACPI patches. I’m considering selling CD’s with my base image on it, all configured with Gentoo or RedHat. Let me know if this is something you’re interested in, and I’ll get off my duff and do it. Email me kgb (then the at sign here) submarinefund.com.
Mandrake(9.0):
Mandrake 9.0 installed smoothly, but the pcmcia didn’t work. I tried some configuration changes but couldn’t get it to work. The sound didn’t work, of course, and without pcmcia and wireless I was wasting my time. Instead of rebuilding my kernel and fixing things I decided to jump to Gentoo.

Wireless howto A real full version of a wireless howto is here
First let me say that encryption was the biggest hurdle for me using any wireless network. I view it as a must, don’t just turn it off so things will work easy. I know it can be cracked and broken, but most people won’t be able to do it, so it is somewhat of a deterrant.
Your WEP keys can be entered with the ASCII clear text version of the key, or the HEX version. There are 2 key lenghts for standard WEP, 40 bits, and 128 bits. A 40 bit WEP key is 5 ASCII characters (such as mykey), and X HEX characters (such as AABBAACCDD) (fix here fill in X and fix example). A 128 bit WEP key is 13 ASCII characters (such as thisismykey1). Windows XP is picky about the ASCII key length you enter, but Linux will just chop off extra bits.
You’ll need 3 things to use your laptop on a wireless network, 1 a driver, 2 wireless tools, and 3 your network settings. Install your driver for your wireless card.. RedHat has a nice looking howto for 8.0 here and here
Install wireless tools, available here (version 26) , home page here. Or, if you’re running Gentoo type emerge net-wireless/wireless-tools as root.
Grab the script I use to get onto my home wireless network, and modify it to meet your needs. You’ll need to change ESSIDHERE to your wireless ESSID for your router, COMPUTERNAMEHERE to your computer’s name/alias (this doesn’t matter much), and KEYHERE to you’re WEB key in ASCII. If you’re using the HEX version of you’re WEP key, delete the leading s: after key, and just put your HEX key in there. Then chnage the IP information, I’ve updated this so it should work on most default access point configurations I’ve come across. (changed the network to the normal 192.168.0.x and put it near the middle of the network at .114.
If you don’t have a WEP key for some crazy reason just delete the part ‘key s:KEYHERE’
Make sure your script is executable, and execute it as root. (chmod uog+x homenet, ./homenet)
I generally place my homenet script in root’s ~/bin/ directory and add it to my path in my .bashrc file.
You should be up and running on your wireless network, try pinging your gateway, then hit the web.

Config files
My 2.6.1 HP ZT1150 Kernel Config file
Wireless network script
Ethernet networking script
XFree86 Config file (/etc/X11/XF86Config-4)
Modules.conf file for oss sound and other gentoo generated things.. Old Modules.conf file for alsa sound and network drivers if they’re not built into kernel, this never worked for me..
My ACPI kernel (1.3MB)
My kernel modules, untar in /lib/modules/ (496K)

Links from page
Synaptics Driver
My desktop screenshot (Jan 23, 2004)
My desktop screenshot (Feb 25, 2003, 148K)
My desktop screenshot (Feb 21, 2003, 70K)
My desktop screenshot (Aug 13, 2002, 200K)
Enlightenment, my window manager of choice
RedHat inc, recommended binary distro for the zt1150
Mandrake, a good distro, better than RedHat, but didn’t work as well out of the box for me
ALSA, the Advanced Linux Sound Architecture
freshmeat’s Enlightenment themes archive
Gentoo Linux, a great source based disto of Linux
Slackware Linux
Debian Linux
Wireless HOWTO
RedHat wireless howto
RedHat 8.0 establishing a wireless connection
The Linux Documentation Project
The Linux Kernel Archives
Another HP zt1000 users page, Gentoo even!

Support gaming on linux! Sign this petition for Half-Life 2 native port..

,

No Comments

LCOD – 3.19.07 – finding shared folders in vmware

Not sure where to find files in your Linux vmware host when you’ve shared them as a vmware shared folder?

“In a Linux virtual machine, shared folders appear under /mnt/hgfs. So the shared folder in this example would appear as /mnt/hgfs/Test files.”

So if you share it as drive I it will show up as /mnt/hgfs/drive I
Which you would need to access with a \ to escape out that space in the path…

cd /mnt/hgfs/drive\ I

I finally found this info here, after searching all over…

http://www.vmware.com/support/ws45/doc/running_sharefold_ws.html

, ,

No Comments