Symlink, ln

Common synlink’s you do.

ln -s /usr/bin/svnlite /usr/bin/svn

ln -s /usr/local/share/munin/plugins/scs_directory_size_v3_ /usr/local/etc/munin/plugins/scs_directory_size_v3___var___db___mysql


FreeBSD changing shells quickly

Change shell to sh

# chsh -s /bin/sh <username>

Change shell to nologin

# chsh -s /usr/sbin/nologin <username>

Change shell to scponly

# chsh -s /usr/local/bin/scponly <username>

Quickly checking which users have non nologin shells

# grep --invert-match 'nologin' /etc/passwd

GhettoVBB, ESXi 5.5 & Crontab

# vi /etc/rc.local.d/

Make the contents something similar to the following…


# local configuration options

# Note: modify at your own risk! If you do/use anything in this
# script that is not part of a stable API (relying on files to be in
# specific places, specific tools, specific output, etc) there is a
# possibility you will end up with a broken system after patching or
# upgrading. Changes are not supported unless under direction of
# VMware support.
/bin/kill $(cat /var/run/ # Gets the cron service pid and simply kills it.
# The next line writes a typical cron line to the crontab
/bin/echo "0 3 * * * /vmfs/volumes/datastore2/scripts/ghettoVCB/ -a > /vmfs/volumes/datastore2/backups/ghettoVCB-backup-\$(date +%Y-%m-%d-%H%M%S).log" >> /var/spool/cron/crontabs/root

# Finally we start the cron service again
/usr/lib/vmware/busybox/bin/busybox crond
exit 0

The $(date) is escaped so that the command doesn’t execute during boottime and always log to the a file with the date and time of the last reboot!

Reboot to be sure it’s worked as expected.