Wednesday, April 23, 2014

Debian Core - Tricks & Tips

If you don't have Debian Core installed, here is the tutorial.  These are some tips and tricks that I have found useful. Use ROOT for all of these.

Hide This Login Information
touch ~/.hushlogin


Install Archey And Have It Run After login
apt-get install lsb-release scrot python ca-certificates

wget http://github.com/downloads/djmelik/archey/archey-0.2.8.deb

dpkg -i archey-0.2.8.deb

nano ~/.bashrc

Add these lines to the bottom - host -i displays the connected IP address

clear
archey
hostname -i
echo

To add to other users besides Root - nano /home/YOURuserNAME/.bashrc

clear
archey
hostname -i
echo

Auto-Login / Disable Extra ttys
nano /etc/inittab

change tty1 to: 1:2345:respawn:/sbin/getty tty1 --autologin root
User name is at the end.
I didn't notice any speed improvements, but if you want to disable tty3-tty6, comment them out with a #
Do NOT comment out tty1 or tty2


Enable Tab Completion
This allows you to use TAB when typing to save time.

apt-get install bash-completion


Skip GRUB Boot Menu
nano /etc/default/grub

Change GRUB_TIMEOUT=5 to GRUB_TIMEOUT=0

update-grub

Random Mac On Boot




apt-get install macchanger
nano /etc/init.d/macchanger

Add these lines (Change/remove eth0 and wlan0 if needed - ifconfig to check)

ifconfig eth0 down
ifconfig wlan0 down

/usr/bin/macchanger -r eth0 >/dev/null 2>/dev/null &
/usr/bin/macchanger -r wlan0 >/dev/null 2>/dev/null &

ifconfig eth0 up
ifconfig wlan0 up

dhclient eth0 >/dev/null 2>/dev/null &
dhclient wlan0 >/dev/null 2>/dev/null &

chmod +x /etc/init.d/macchanger
update-rc.d macchanger defaults 10
To check the difference after a reboot - macchanger -s eth0


Disable SSH Service On Boot
update-rc.d ssh remove

To start the service when you want to (root needed) service ssh start
To check if ssh is running service ssh status

2 comments:

  1. archey = error:

    Traceback (most recent call last):
    File "/usr/bin/archey", line 304, in
    func()
    File "/usr/bin/archey", line 193, in user_display
    output ('User', username)
    File "/usr/bin/archey", line 134, in output
    result.append(output)
    UnboundLocalError: local variable 'output' referenced before assignment
    127.0.1.1

    ReplyDelete
    Replies
    1. Try "sudo apt-get install python --no-install-recommends"
      For some reason that was left out on the original post...

      Delete