ciphermethod.com

Ubuntu Missing Swap

by on Dec.13, 2014, under Linux, Ubuntu


Fix missing swap on Ubuntu derivatives when using encrypted home directories:

$ swapon -s
Filename Type Size Used Priority

$ free
total used free shared buffers cached
Mem: 1010504 905892 104612 16964 14460 370292
-/+ buffers/cache: 521140 489364
Swap: 0 0 0

$ sudo -s
# fdisk -l | grep swap
..
Disk /dev/mapper/mint--vg-swap_1: 1069 MB, 1069547520 bytes
..

# mkswap /dev/mapper/mint--vg-swap_1 # copy UUID shown into next cmdline
mkswap: /dev/mapper/mint--vg-swap_1: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 1044476 KiB
no label, UUID=08109738-64e7-4504-8bfd-2dff2011551d
# echo "RESUME=UUID=143c43d8-0a77-4d62-a7ae-f53a8e0229a9" > /etc/initramfs-tools/conf.d/resume
# echo "cryptswap1 /dev/sdb3 /dev/urandom swap,cipher=aes-cbc-essiv:sha256" > /etc/crypttab
# update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.13.0-24-generic
Warning: No support for locale: en_US.utf8

# swapon -s
Filename Type Size Used Priority
/dev/mapper/mint--vg-swap_1 partition 1044476 316 -1
# free
total used free shared buffers cached
Mem: 1010504 863964 146540 16984 12820 326476
-/+ buffers/cache: 524668 485836
Swap: 1044476 316 1044160

Leave a Comment more...

Script: jbcleanup.sh

by on Oct.24, 2014, under Linux, Scripts


#!/bin/sh
# 20141024 - Jamey Hopkins
echo "Before: `ls *log* | wc -l` Files at `du -h . | cut -f1`"
[ 0 -ne `find *server.log -mtime +9 | wc -l` ] && find *server.log -mtime +9 | xargs gzip -v
[ 0 -ne `find *server.log.gz -mtime +30 | wc -l` ] && find *server.log.gz -mtime +30 | xargs rm
echo "After : `ls *log* | wc -l` Files at `du -h . | cut -f1`"

Leave a Comment more...

SSL 3.0 Protocol Vulnerability and POODLE Attack | US-CERT

by on Oct.17, 2014, under Security

Systems AffectedAll systems and applications utilizing the Secure Socket Layer (SSL) 3.0 with cipher-block chaining (CBC) mode ciphers may be vulnerable. However, the POODLE (Padding Oracle On Downgraded Legacy Encryption) attack demonstrates this vulnerability using web browsers and web servers, which is one of the most likely exploitation scenarios.Some Transport Layer Security (TLS) implementations are also vulnerable to the POODLE attack.

Source: SSL 3.0 Protocol Vulnerability and POODLE Attack | US-CERT

Leave a Comment more...


20140821 – Scan SCSI Bus for New Disk

by on Aug.21, 2014, under Linux

# 20140821 scan scsi bus for new disks (RHEL 5) – Jamey Hopkins
# echo 1 > /sys/block/sd?/device/rescan (RHEL 6)
cd /sys/class/scsi_host/
for h in `ls`; do echo $h;[ -f $h/scan ] && echo ‘- – -‘ >$h/scan;done
# use partprobe to throw error for unrecognized disk
partprobe

Leave a Comment more...


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

But Wait, There's More!

A few highly recommended friends...