Skip to content

Instantly share code, notes, and snippets.

View skarllot's full-sized avatar
💭
I may be slow to respond.

Fabrício Godoy skarllot

💭
I may be slow to respond.
View GitHub Profile
@skarllot
skarllot / bacula-dir.conf
Created January 7, 2014 17:49
Include directory into Bacula configuration
. . .
@|"sh -c 'for f in /etc/bacula/conf.d/*.conf ; do echo @${f} ; done'"
@skarllot
skarllot / smb.conf
Created January 17, 2014 12:42
Linux Samba access-based enumeration
. . .
[Share]
. . .
hide unreadable = yes
hide unwriteable files = yes
. . .
@skarllot
skarllot / smb.conf
Created January 17, 2014 12:46
Linux Samba recycle
. . .
[Share]
. . .
vfs objects = recycle
# Creates a folder per user
recycle:repository = .recycle/%u
recycle:keeptree = yes
recycle:versions = yes
# Not needed
@skarllot
skarllot / commands.sh
Last active March 1, 2016 23:02
FreeBSD commands
# Monitor network traffic
systat -ifstat
# ZFS pool status
zpool status
zpool status -x
# ZFS main information
zfs list
@skarllot
skarllot / rescan.sh
Created January 31, 2014 19:21
Force the rescan of partition to get the kernel aware of the new size
echo 1 > /sys/block/sda/device/rescan
# Reference: http://blog.gurudelleccelsopicco.org/2009/09/online-lun-expansion-and-partition-resizing-without-reboot-under-linux/
@skarllot
skarllot / rc.local
Last active August 29, 2015 13:55
Turn available apache directory, that is outside of chroot, to VSFTPD user
. . .
mount -o bind,rw,acl /var/www/[page-directory] /var/vsftpd/[user]/www
@skarllot
skarllot / mount-vss.bat
Created February 7, 2014 13:04
Assign a mount point-like to Volume Shadow Copy
:: List available shadows
diskshadow
list shadows all
:: Create a symbolic link to shadow
mklink /d C:\SHADOW01 \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\
@skarllot
skarllot / fstab
Last active August 29, 2015 13:56
Mount network volume (NFS, iSCSI, OCFS, GFS etc)
. . .
/dev/foo1 /foo ocfs2 _netdev 0 0
# _netdev
# Ensures that the OCFS2 volume is not mounted before the networking
# structure is up, and ensures that there is an unmount before shutting down
# the network.
# http://pic.dhe.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fliaag%2Focfs2%2Fl0wocf00_ocfs2_mounting_shared_devices.htm
@skarllot
skarllot / make-icpbrasil-bundle.sh
Last active November 16, 2024 21:48
Download ICP-Brasil certificates and make a bundle
#!/bin/bash
HTTPADDR=http://acraiz.icpbrasil.gov.br/credenciadas/CertificadosAC-ICP-Brasil/ACcompactado.zip
DEST=/etc/ssl/certs/icp-brasil
mkdir -p ${DEST}
cd ${DEST}
rm -f *.crt
rm -f *.zip
@skarllot
skarllot / getip.sh
Created March 28, 2014 20:04
Scripts to get MAC from IP and IP from MAC
#!/bin/bash
if [ -z "$1" ]; then
echo "Please especify an ARP address"
exit 1
fi
MAC=${1//-/}
MAC=${MAC//:/}
MAC=${MAC:0:2}:${MAC:2:2}:${MAC:4:2}:${MAC:6:2}:${MAC:8:2}:${MAC:10:2}