32 BIT: $ sudo wget --output-document=/etc/apt/sources.list http://www.torino19.org/mike/pool/apt/sources.list/i586/sources.list 64 BIT: $ sudo wget --output-document=/etc/apt/sources.list http://www.torino19.org/mike/pool/apt/sources.list/amd64/sources.list
$ sudo -i # apt-get clean # mv /var/lib/apt/lists /var/lib/apt/lists.old # mkdir -p /var/lib/apt/lists/partial # apt-get clean ; apt-get update ; exit
dpkg -P --force-all nagios-common
List the package contents and take a note of this list $ dpkg -L nagios-common go to the directory /var/lib/dpkg/info $ cd /var/lib/dpkg/info remove problematic scripts # rm YOURPACKAGE.* uninstall package # apt-get remove --purge YOURPACKAGE to finish up, remove all files you found previously with 'dpkg -L'
apt list | grep 'residual-config'
sudo aptitude purge ~c
Install the nautilus-open-terminal package.
Then you will need to log out and log in again, or simply restart nautilus:
nautilus -q
Alt-F2 -> nautilus
# aptitude install pulseaudio pulseaudio-module-gconf
$ nano /etc/asound.conf
(paste this inside:)
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc $ gconftool-2 -t string --set /system/gstreamer/0.10/default/musicaudiosink pulsesink Note that many other programs should be configured to use pulsaudio, for example mplayer: # nano /etc/mplayer/mplayer.conf search "ao=alsa" and replace it with "ao=pulse"
ASYNCMOUNTNFS="no"
Obviously you need a strong routing table to avoid lost packets, the trick is control arp requests and replies: In your sysctl.conf you should set these parameters:
net.ipv4.ip_forward=1 //this is an IPv4 router net.ipv6.conf.all.forwarding=1 //this is an IPv6 router net.ipv4.conf.all.arp_ignore=1 //we ignoring ARP packets to avoid routing problem with 2 interfaces in the same subnet, note that you can also specify the correct interface instead of "all") net.ipv4.conf.all.arp_announce=2
An excellent reference page about this problem and these fixes.
This is very useful to check if a device outside our subnet is still alive without compromise the routing table.
$ sudo arping -c 1 -S SOURCE_IP -T DESTINATION_IP MAC_ADDRESS_GW
SOURCE_IP is our ip address DESTINATION_IP is the ip address of device to be checked MAC_ADDRESS_GW is the mac address of a machine/router available on our subnet able to reach DESTINATION_IP
sudo dnsmasq -i eth0 -d --dhcp-range=192.168.89.90,192.168.89.100
python -m SimpleHTTPServer 8000 python3 -m http.server 8080
python -m pyftpdlib -p 2121
# shutdown -h +X # X = minutes to wait before shutdown # shutdown -h 23:20 # 23:20 = hh.mm, system wait until system clock is 22.30 then shutdown # sleep X ; dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend method return sender=:1.22 -> dest=:1.125 reply_serial=2 # X = minutes to wait before hibernate
tail --pid=${PID} -f /dev/null
jffs2dump -b -c -e dest_file.little src_file.big
ssh remoteuser@remotehost -R forwardedsshport:localhost:localsshport -t "ssh -D dynamicproxyport localuser@localhost -p forwardedsshport"
This is based on 1, 2 and some stuffs found on the net. The following steps assumes that your using a Debian based distro with Gnome as DM.
$ sudo apt-get install libpam-usb
$ sudo pamusb-conf --add-user YOURUSER
$ echo "[Desktop Entry] Name=pamusb-agent GenericName=PAM USB Auth Exec=/usr/bin/pamusb-agent Terminal=false Categories=Tools Type=Application StartupNotify=false X-GNOME-Autostart-enabled=true" > ~/.config/autostart/pamusb-agent.desktop
$ sudo vi /etc/pamusb.conf
Look for the row containing <user id="YOURUSER"> and append before </user> the following lines
<agent event="lock">dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock</agent>
<agent event="unlock">dbus-send --session --dest=org.gnome.ScreenSaver --type=method_call --print-reply --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.SetActive boolean:false</agent>
$ udevinfo -a -p $(udevinfo -q path -n /dev/sdb) # NOTE: Debian sid has renamed this utility to udevadm. The equivalent command is below: # udevadm info --name=/dev/sdb --attribute-walk
sudo nano /etc/udev/rules.d/99-customautomount.rules
BUS=="usb", SYSFS{product}=="TS128MJFLASHA", KERNEL=="sd?1", run+="/bin/mount /mnt/Films"
# apt-get install devilspie2
$ mkdir ~/.config/devilspie2
$ nano ~/.config/devilspie2/terminal.lua if (get_application_name() == "Terminal") then set_window_opacity(0.85) set_window_size(1000, 650) center() end
$ nano ~/.config/autostart/devilspie2.desktop [Desktop Entry] Type=Application Exec=/usr/bin/devilspie2 Hidden=false X-GNOME-Autostart-enabled=true Name[en_US]=devilspie2 Name=devilspie2 Comment[en_US]=devilspie2 Comment=devilspie2
If you are a real hacker you can't imagine something better then Jurassic Park login!
insert this line immediately before the line with pam_deny.so module auth [default=ignore] pam_exec.so seteuid /usr/bin/didntsaythemagicword Now edit the two lines above (pam_unix and pam_winbind) and increase in every line success number by one, for example if you have success=2 change it to success=3. This is needed to skip our extra line when auth is successful.
#!/bin/sh
# Check current TTY and if we are on fail login case or not
if [ -z "$PAM_TTY" ] ; then
PAM_TTY=`tty`
NOTUSINGPAM=yes
fi
MYTTY=$PAM_TTY
echo -n "access: PERMISSION DENIED." 1>$MYTTY
# How many failed attempts in 5 minutes?
LOG="/tmp/jurassikpark-${PAM_RHOST}-${PAM_RUSER}-${PAM_SERVICE}-`echo $MYTTY | sed s/\\\//_/g`-${PAM_USER}.log"
if [ -e "$LOG" ] ; then
if test $(find "$LOG" -mmin +5) ; then
rm $LOG
else
. $LOG
fi
fi
echo "COUNT_FAILS=`expr $COUNT_FAILS + 1`" > $LOG
. $LOG
if [ "$COUNT_FAILS" -le 2 ] && [ -z "$NOTUSINGPAM" ] ; then
echo "" 1>$MYTTY
exit 0
fi
# Hinibit cursor
setterm -cursor off
# Hinibit ctrl-c ctrl-z
trap "" 2 20
sleep 0.25
sleep 0.25 ; echo -n "...and...." 1>$MYTTY
sleep 0.25 ; echo "YOU DIDN'T SAY THE MAGIC WORD!" 1>$MYTTY
sleep 0.25
if [ -z "$NOTUSINGPAM" ] ; then
mplayer -vo fbdev2 /usr/share/youdidntsaythemagicword.ogv 2>/dev/null 1>/dev/null &
else
mplayer -nogui -vo xv /usr/share/youdidntsaythemagicword.ogv 2>/dev/null 1>/dev/null &
fi
COUNT=0
while [ $COUNT -le 560 ]
do
echo "YOU DIDN'T SAY THE MAGIC WORD!" 1>$MYTTY
sleep 0.05
COUNT=`expr $COUNT + 1`
done
setterm -cursor on
exit 0
# chmod +x /usr/bin/didntsaythemagicword
$ ssh user@ip_server -L 1900:ip_vm:1900
$ ssh user@ip_vm
$ tar zc * | nc -l 1900
nc localhost 1900 | tar zx
tar cpf - . | pv | (cd /dst; tar xf -)
# pvcreate /dev/sdX
# vgextend VolGroup00 /dev/sdX
# lvextend -l +100%FREE /dev/VolGroup00/LogVol02
# resize2fs /dev/VolGroup00/LogVol02