Linux apps and hacks, mostly Fedora/CentOS and Ubuntu.
mkdir `date +%y%m%d%H%M%S`
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/
yum install yum-security yum update --security
- Disable splash by setting Log0=0 in /usr/lib/openoffice.org/program/sofficerc.
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"
Add ISOs as YaST sources
Update to this Novell tip to mount the ISOs at boot the proper way, with 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
Hide unused FTP Directories
Plesk shows FTP user’s chroot directories (/usr, /var, /etc*) by default, this hides all but the important stuff.
<Directory /home/httpd/vhosts> GroupOwner psacln HideNoAccess on HideGroup root </Directory>
Uncomment “auth required pam_wheel.so use_uid“
#!/bin/sh yum -y update
port 123 UDP
yum install ntp
./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)
#!/bin/sh cd /root/chkrootkit ./chkrootkit 2>&1 | grep "INFECTED|Vulnerable"
cd /etc/postfix edit access_client file and add the ip address you want to block (e.g 192.168.10.12)
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 ! firstname.lastname@example.org
Copy to another address
To keep a copy, use the ‘c’ flag:
:0c ! email@example.com
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
* Arf arf.