Category: Linux

Recover root password on Plesk server

So the server admin forgets the root password (*cough* me *cough*) but you still have the plesk ‘admin’ login, here’s how to reset the root password on the plesk box: (it’s a bit technical, I might dumb it down a bit one day and/or make a copy/paste solution) First, you need a normal ssh user […]

SSH Tunneling Fun

forward all connections to my localhost:8080 to port 80 on remote.host # ssh -L 8080:localhost:80 user@remote.host forward all connections to my localhost:8080 to port 80 on the router gateway of another network.very handy for remotely gaining access to boxes (eg: adsl router configs) that do not have remote access setup by default. # ssh -L […]

ffmpeg stuff

just code i’ve used in the past   #2 pass: ffmpeg -i INPUT -an -pass 1 -vcodec libx264 -vpre slow_firstpass -b BIT_RATE -threads 0 OUTPUT.mp4ffmpeg -i INPUT -acodec libfaac -ab 128k -pass 2 -vcodec libx264 -vpre slow -b BIT_RATE -threads 0 OUTPUT.mp4     #!/bin/bash #now we transcode the concatenated video to .mp4 and .oggnice […]

ProFTP Passive mode FTP slow Plesk

Connecting to a ProFTP server in Passive mode wouldn’t work, or was very very slow. This happened on a Plesk box. Open /etc/proftpd.conf and scroll to the bottom, add this setting: PassivePorts 60000 60019 Restart proftpd, or xinetd just to be safe: /etc/init.d/xinetd restart    

Plesk fix quota issue

Had this issue on plesk, when disk space is used up by a client and you increase the space in the control panel, sometimes it doesn’t go through to the system. Login via ssh and su to root, type these commands: # quotaoff -a# quotacheck -am# quotaon -a If that doesn’t work and the plesk […]

rsync – incremental backup of files and folders

Just some rsync commands for next time I forget: Put this in a bash script ie: run-backup.sh #!/bin/bash export PATH=$PATH:/bin:/usr/bin:/usr/local/bin echo “Mounting backup drive:”; mount /backup BACKUPDIR=`date %A`; nice rsync –progress –force –ignore-errors –delete-excluded –delete –backup –backup-dir=/backup/$BACKUPDIR -a /data/ /backup/current; echo “All complete, unmounting backup drive”; umount /backup This will mount a /backup drive (ie: […]