Skip to main content

Posts

Showing posts from 2005

Notable tar Usages

From the gnu.org site: For example, here is how you might copy a directory's contents from one disk to another, while preserving the dates, modes, owners and link-structure of all the files therein. In this case, the transfer medium is a pipe , which is one a Unix redirection mechanism: $ cd sourcedir; tar -cf - . | (cd targetdir; tar -xf -) Here's a sample: sudo tar cvzf /media/MyBook500-ext3/Volume/home-2007-10-20.tgz /home/

Copy a Directory using tar

Another way to copy directory hierarchies is to use the tar utility, described in section 6.3.7 . The following sequence of commands copies a structure from the source directory to the destination directory: % cd source_dir ; tar cf - . | (cd destination_dir ; tar xfBp -) The " - " is used for the name of the tar file (argument to the f option) so that tar writes to the standard output or reads from the standard input, as appropriate.

Apache and the SUexecUserGroup directive

This is why the server was giving a 500 Internal Server Error when we'd run a script via a browser. From the file /home/httpd/vhosts/ /conf/httpd.conf: There was a directive: SUexecUserGroup user group (The user was a local username and group . The command takes these 2 arguments. It's a cgi wrapper for security and tells spawned scripts to be run as that user and group. It is not used by default. Read more about the whole thing here: http://httpd.apache.org/docs/2.0/suexec.html

Spam Assassin Upgrade Log

son of babbage June 21, 2005 Goal: Use yum to upgrade spamassassin to the most current version (3.03) Issue: Spamassassin 2.61 is already installed and yum won't upgrade it. Solution: Remove existing version and reinstall from the DAG repository. 1. Remove existing version This step will remove spamassassin, the Plesk spamassassin interface, psa-spamassassin, plus the spamassassin section in each user's .qmail file. [admin@localhost admin]$ sudo yum remove spamassassin ... I will do the following: [erase: spamassassin 2.61-3.i586] I will erase these to satisfy the dependencies: [deps: psa-spamassassin 7.0.3-fc1.build040611.14.i586] Is this ok [y/N]: y Running test transaction: Test transaction complete, Success! ===> Reading /etc/psa/psa.conf ... Delete spamassassin preferences from .qmail files for mailnames ... Erased: spamassassin 2.61-3.i586 psa-spamassassin 7.0.3-fc1.build040611.14.i586 Transaction(s)

Making PCMCIA detection work in Babbage server

Server was preconfigured to have PCMCIA disabled. 1.) Found startup scripts were disabled. They had renamed the startup scripts in these runlevels (2-5) to kill scripts. # mv /etc/rc.d/rc2.d/K96pcmcia /etc/rc.d/rc2.d/S09pcmcia (repeat this for rc3.d, rc4.d, rc5.d directories). 2.) Still gettting "no pcmcia driver in /proc/devices" in /var/log/messages. Also get when you do 'cardctl -v -o' (-o means run once in foreground, -v means verbose) Check file /etc/sysconfig/pcmcia. It looked like: PCMCIA=no PCIC= PCIC_OPTS= CORE_OPTS= It should look like: [kws@localhost sysconfig]$ more pcmcia PCMCIA=yes PCIC=yenta_socket PCIC_OPTS= CORE_OPTS= This is a Dell laptop, all laptops seem to have the same config.

Installing Webmin on Fedora FC1

http://dag.wieers.com/ http://forums.fedoraforum.org/showthread.php?t=45920 http://stanton-finley.net/fedora_core_3_installation_notes.html#Yum Note that for FC3 or later, instead of added to /etc/yum.conf, you add a new file /etc/fum/repos.d/dag.repo (see above links). FC1: instructions: http://dag.wieers.com/home-made/apt/FAQ.php#B 1.) Add this section to /etc/yum.conf, or create the file /etc/yum.repos.d/dag.repo with these contents:) [dag] name=Dag RPM Repository for Fedora Core baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag gpgcheck=1 enabled=1 2.) Add key for dag to rpm: [root@localhost etc]# rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt 3.) Install webmin: (with the other dependencies): [root@localhost etc]# yum install webmin Gathering header information file(s) from server(s) Server: Fedora Core 1 - i386 - Base Server: Dag RPM Repository for Fedora Core Server: Fedora Core 1 - i386 - Released Updates Finding updated packages Downloading n

rsync web pages

rsync is an open source utility that provides fast incremental file transfer, available under the GNU General Public License version 2. rsync is hosted at http://samba.org/ .

IRM - The Information Resource Manager

IRM is a PHP, Pear & MySQL based computer inventory system: IRM, the Information Resource Manager, is a powerful web-based asset tracking and trouble ticket system built for IT departments and HelpDesks. It keeps detailed information about each computer, as well as providing a trouble ticket system, an FAQ system, and a Knowledgebase

Qmail Help

Help for Qmail is on the way at: The Qmail home page: http://www.qmail.org/ - select a mirror. The qmail HOWTO v2: http://www.flounder.net/qmail/qmail-howto.html

SpamAssassin Help

We are configuring SpamAssassin. Here's what we found to help out. The Apache SpamAssassin Project http://spamassassin.apache.org/ The SpamAssassin Wiki: http://wiki.apache.org/spamassassin/FrontPage The SpamAssassin Configuration Generator (2.5.x) http://www.yrex.com/spam/spamconfig.php

Knoppix 3.2 XF86Config-4

This file was generated by Knoppix 3.2 on my ShuttleX, with the ATI Radeon 9000 video card & Viewsonic VA-800 monitor. Section "ServerLayout" Identifier "XFree86 Configured" Screen 0 "Screen0" 0 0 InputDevice "Keyboard0" "CoreKeyboard" # PS/2 Mouse not detected # Serial Mouse not detected InputDevice "USB Mouse" "CorePointer" EndSection Section "ServerFlags" Option "AllowMouseOpenFail" "true" EndSection Section "Files" RgbPath "/usr/X11R6/lib/X11/rgb" ModulePath "/usr/X11R6/lib/modules" FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/misc" FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/75dpi" FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled" FontPath "

Configuring sudo

For administrators. The sudo command is preferable to su but often your shell account is not configured to use this command. Typical error message: [name] is not in the sudoers file. This incident will be reported You need to: Configure sudo to allow the wheel group to use sudo. Add the desired accounts to the wheel group. Here's how: Log in as the super user: su - visudo Type: i Uncomment the specified line (see below) Save and quit: [Esc] :wq Uncomment the wheel group line as follows (or paste this in, if it's not in /etc/sudoers) # Uncomment to allow people in group wheel to run all commands %wheel ALL=(ALL) ALL Then, add the accounts to the group wheel to give them sudo access. gpasswd -a [name] wheel Adding user [name] to group wheel Then, after you've added your account name, exit Try sudo . You must enter your password (not root!) once per session. You're done!

Configuring YUM for DAG

Don't know what DAG is yet, but this is good for adding more packages: (libnet is needed by nessus) Add this to bottom of /etc/yum.conf: [dag] name=Dag RPM Repository for Fedora Core baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag (This on the page http://dag.wieers.com/home-made/apt/FAQ.php#B) Then do the following to find the pkg. note that when i do yum install later down, it picks the latest one. :) [root@localhost etc]# yum search libnet Searching Packages: Setting up Repo: dag repomd.xml 100% |=========================| 951 B 00:00 Setting up Repo: base repomd.xml 100% |=========================| 1.1 kB 00:00 Setting up Repo: updates-released repomd.xml 100% |=========================| 951 B 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 566 kB 00:01 MD Read : #################################################

Red Hat Fedora Core 3 YUM

YUM is great. Here's the first time I used it to install a package needed by nessus: YUM solves dependencies and everything (see gtk install lower half). [root@localhost ~]# sh nessus-installer.sh The script needs uudecode(1) to run properly Install the package 'sharutils-*.rpm' [root@localhost ~]# yum install sharutils Setting up Install Process Setting up Repo: base repomd.xml 100% |=========================| 1.1 kB 00:00 Setting up Repo: updates-released repomd.xml 100% |=========================| 951 B 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 797 kB 00:03 MD Read : ################################################## 2623/2623 base : ################################################## 2622/2622 primary.xml.gz 100% |=========================| 207 kB 00:10 MD Read : ################################################## 463/4

Using RedHat Fedora FC3

Been using this for a few weeks did several installs. there was some wierdness on 3 machines... 1. Installing on a Dell Inspiron 8600, the install hung several times. I powered off and tried again and it was fine again. The system has been perfect ever since and works great. 2.) During install on a Dell Inspiron 7500, the install hung during CD1. I started over and it went fine until CD3, where there was a read error and I had to clean some stuff off the disk. Since then it was fine and the system now works great, although there is no sound. Maybe these lockups are all related to media issues. I am using a copy I burned. 3.) One machine my CD3 was bad (burner error, the whole disk was actually blank) and I left the machine sitting there for 3 days until I got a new copy. When I finally continued, the install finished but after the reboot there is some video wierdness like when I go to Applications/System Tools, the menu there is empty (I am root). I was going to reintsall, but