Hey All, (whoever this is reading anyway)

I haven't been writing for a while due to the fact I was busy with all sort of things.

Mostly linux, work and music though.

I am using Kali now and I am learning all sort of things about pentesting, vpn and the whole hacking community.

I messed up my kali root partition the other day and luckily Linux creates a new "home" directory structure for you at next log on. AFter I messed up I realized I needed to backup my own stuf as much I can I created a crontab job to backup every hour.

If you haven't made one, here is the the command to check if you have anything running: crontab -l (to list it) and if you don't have anything it will be all commented out. There is a example thing in it and if you google it a bit you can do what every you want with it,

Mine is looking like this now:

# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
0 */1 * * * tar -zcf /var/backups/bckp.tgz /root/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command

 

I also made sure it is opening with leafpad when I open it with crontab -e, but that's up to you and your distro.

I had to recreate my .bashrc file again and I have set it to this now:

##################################Custom .bashrc Script##################################
#bashprompt
export PS1="\[\e[1;33m\]\u@\h->\[\e[m\] "
#aliases
alias cls="clear"
alias ls="ls -lai"
alias lfp="leafpad"
#default editor
export EDITOR=leafpad

Also I had made a adjustment to rc.local which I shouldn't and that's where it all started with. I wanted to get that fixed, which made me copy paste and error into the code which remove my ~ directory.......duh.... just because of an space that occurred in the command out of laziness by copy paste from a website! So f.... stupid. Before I knew it my background disappeared and my notes / files were gone. Luckily it wasn't much, but still enough to make me swear! Ah well must have been that learning curve..

Anyway, I have it all fixed again and I fixed that rc.local thing as well. I took out the extra line I had put in there in the first place and forgot all about. So actually I fixed the thing I messed up in the first place, to mess it up even more and then clean it up ;-)
It took me hours to find that out. Every google you do leads to something else, until you interpret some of the answers properly: "rc.local is obsolete, it shouldn't be doing nothing at all" ...go figure when you try to fix an error.... SO you shouldn't be fixing anything, YOU SHOULD NOT USED IT!!

It turned out well, anyway.

there should be nothing in you rc.local file except the : exit 0!
This is what mine looks like now

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Numlock enable
#[ -x /usr/bin/numlockx ] && numlockx on

exit 0
I had the line with the numlock enabled, because my numlock isn't enabled when I start.

As I know google is your friend, but it can be your enemy as well.

Have fun and a great weekend.

Regards,

CornElvis