Linux apps and hacks, mostly Fedora/CentOS and Ubuntu.
mkdir `date +%y%m%d%H%M%S`
CentOS
CentOS 6 Netinstall URLs
32 bit: http://mirror.centos.org/centos/6/os/i386/ 64 bit: http://mirror.centos.org/centos/6/os/x86_64/
Fedora
Yum Security Updates
yum install yum-security yum update --security
BASH
OpenOffice
- Disable splash by setting Log0=0 in /usr/lib/openoffice.org/program/sofficerc.
Gvim
Firefox
browser.urlbar.clickSelectsAll
CheckInstall
I haven’t actually used this yet, but I’ll be trying it shortly because it sounds like a brilliant idea. In a nutshell, it builds RPM/DEB/ETC packages from source packages; so rather than going ./configure ; make ; make install, you go ./configure ; make ; checkinstall, and then install the package (this part can be automated too). If you don’t want the package, you just uninstall it as you usually would with your package manager.
Anyone that’s ever installed something from source will probably recognise the advantage in this, but if you haven’t, it means you don’t have to worry about executables being left executable, cron jobs or processes being left running, or files being scattered all over your system. It would appear to be very convenient.
Finding a text string in a dir tree
If you want to find “some text” in an entire directory tree ( let’s say its /your_website_dir/htdocs/)
cd /your_website_dir/ find htdocs -print | xargs grep -is "some text"
SuSE
Add ISOs as YaST sources
Update to this Novell tip to mount the ISOs at boot the proper way, with fstab.
/etc/fstab
/PATH/TO/ISOS/SUSE-10.0-CD-i386-GM-CD1.iso /PATH/TO/MOUNT/POINTS/1 iso9660 suid,dev,mode=444,loop,exec 0 0 /PATH/TO/ISOS/SUSE-10.0-CD-i386-GM-CD2.iso /PATH/TO/MOUNT/POINTS/2 iso9660 suid,dev,mode=444,loop,exec 0 0 /PATH/TO/ISOS/SUSE-10.0-CD-i386-GM-CD3.iso /PATH/TO/MOUNT/POINTS/3 iso9660 suid,dev,mode=444,loop,exec 0 0 /PATH/TO/ISOS/SUSE-10.0-CD-i386-GM-CD4.iso /PATH/TO/MOUNT/POINTS/4 iso9660 suid,dev,mode=444,loop,exec 0 0 /PATH/TO/ISOS/SUSE-10.0-CD-i386-GM-CD5.iso /PATH/TO/MOUNT/POINTS/5 iso9660 suid,dev,mode=444,loop,exec 0 0
Plesk
Hide unused FTP Directories
Plesk shows FTP user’s chroot directories (/usr, /var, /etc*) by default, this hides all but the important stuff.
/etc/proftpd.conf
<Directory /home/httpd/vhosts> GroupOwner psacln HideNoAccess on HideGroup root </Directory>
Server Setup
/etc/pam.d/su
Uncomment “auth required pam_wheel.so use_uid“
/etc/cron.daily/yum
#!/bin/sh yum -y update
NTP
port 123 UDP
yum install ntp
rkhunter
./installer.sh –layout default –install rkhunter –propupd –pkgmgr RPM
#!/bin/bash rkhunter --update (rkhunter -c --cronjob 2>&1 | mail -s "Daily Rkhunter Scan Report" root)
chkrootkit
#!/bin/sh cd /root/chkrootkit ./chkrootkit 2>&1 | grep "INFECTED|Vulnerable"
IP Blocking
cd /etc/postfix edit access_client file and add the ip address you want to block (e.g 192.168.10.12)
192.168.10.12 REJECT
save and exit, then type
postmap hash:access_client postfix reload
Forward to another address
If I wanted mail forwarded, I would cd /home/username/ (or cd ~, or even just typing cd will get you home) and edit .procmailrc (if its not there, just create one) to add this:
:0 ! user@domain.tld
Copy to another address
To keep a copy, use the ‘c’ flag:
:0c ! user@domain.tld
To bin spam flagged by SpamAssassin
Ok, it’s ruthless, but if you just want to bin spam without seeing it add this.
LOGFILE=procmail.log Redirect=/dev/null/ :0fw |/usr/bin/spamc :0 ! ^X-Spam-Status: Yes $Redirect
The :0fw bit feeds all your incoming mail to the spamassassin daemon for processing. If it’s flagged as spam, an extra header , X-Spam-Status , is added to mail header. It’s also usefull to have a log file of this activity – that’s the LOGFILE line. The log will be in your (or your users) home dir.
If you would rather the spam got redirected to a text file in your home dir, just change /dev/null/ to SPAM
Outlook Migration
http://sourceforge.net/projects/kdepimpi/
Misc
* Arf arf.