Linux Security Good Practice

Some people say that hackers like to attack Windows/Mac system. The reason is because there are a lot of user of those. Is it true? I think it is not.
Each computer is prone to be attacked once you start to use it. In this case, if you are using Linux, you also need to keep good practice to protect your computer.

These are some good proctice to keep your Linux system safe.
a. Keep your system up-to-date
b. Only install software from trusted sources
c. Use strong password and always change it regularly
d. Disable all services that you are not using
e. Backup your data/system regularly
f. Do not use root account to access your machine. You can use sudo utility to act as root temporaly

Linux Security Good Practice

[Book Review] Visual Quickstart Guide – Unix and Linux

visual_quickstart_guide_unix_linux

I need to refresh my knowledge about basic commands in Linux. I browse some reference books but I do not want to read detailed information. So, I try to find some linux pocket books. I get ‘Visual Quickstart Guide – Unix and Linux (Fifth Edition)‘ by Deborah S. Ray and Eric J. Ray.

Overall, yeah.. it is not for advanced users or one who is looking detailed information. It lists only common commands that we can use in daily administration tasks. Those are:

  • How to work with Directories and Files (e.g. ls, mkdir, find, touch, tar, gzip, etc)
  • How to manipulate files and control their ownership and permissions
  • How to write basic scripts
  • How to edit files using vim and nano
  • How to sending and reading emails
  • How to access internet (e.g. using ssh, telnet, ftp, etc)
  • How to get information about the system
  •  
    Beyond that, this book also provides references about commands, flags and arguments. Those can be used as your handy utilities when you do your tasks.

    [Book Review] Visual Quickstart Guide – Unix and Linux

    Common Unix/Linux directories

    Common Unix/Linux directories and their contents.

    main_linux_directories

    Directory Contents
    /bin Essential programs and commands for use by all users
    /boot Files used in booting the operating system
    /dev Device folder, such as alarm, cdrom, cpu, cdrw, etc.
    /etc System configuration files and global settings
    /etc/sysconfig Files that control the system configuration
    /etc/X11 Configuration files for X Window System
    /lib Shared libraries
    /home Home directories for users
    /lost+found Recovering files which are not properly closed due to many reason such as power failure
    /misc This directory is used for automatically mounting directories on removable devices and remote directories
    /mnt The mount points for file systems mounted after the system is booted
    /opt Optional application software packages
    /proc Location of virtual file system
    /root Home directory for root user
    /sbin Essential system binaries
    /tmp Temporary files
    /usr/bin Commands and programs that are less central to basic Unix system functionality than those in /bin but still useful and often important
    /usr/include Standard include file and header files for C programs
    /usr/lib Libraries for installed packages
    /usr/local Most files and data that were developed or customized on the system
    /usr/share Shared data file
    /var Changeable data, including system logs, temporary data from programs, and user main storage
    Common Unix/Linux directories

    Solution for problem when running Eclipse Luna SR2 (4.4.2) on Linux

    I got these error messages when running Eclipse Luna SR2 (4.4.2) on my Kali Linux.

    org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized.

    (java:4447): GLib-GObject-WARNING **: cannot register existing type `GdkDisplayManager’

    (java:4447): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0′ failed

    (java:4447): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)’ failed

    (java:4447): GLib-GObject-WARNING **: invalid (NULL) pointer instance

    (java:4447): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)’ failed

    (java:4447): GLib-GObject-WARNING **: invalid (NULL) pointer instance

    (java:4447): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)’ failed

    (java:4447): GLib-GObject-WARNING **: cannot register existing type `GdkDisplay’

    (java:4447): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0′ failed

    (java:4447): GLib-GObject-CRITICAL **: g_type_register_static: assertion `parent_type > 0′ failed

    (java:4447): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0′ failed

    (java:4447): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)’ failed
    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    # SIGSEGV (0xb) at pc=0x00007ffded91473f, pid=4447, tid=140728895072000
    #
    # JRE version: OpenJDK Runtime Environment (7.0_79-b14) (build 1.7.0_79-b14)
    # Java VM: OpenJDK 64-Bit Server VM (24.79-b02 mixed mode linux-amd64 compressed oops)
    # Derivative: IcedTea 2.5.5
    # Distribution: Debian GNU/Linux 7.8 (wheezy), package 7u79-2.5.5-1~deb7u1
    # Problematic frame:
    # C [libgdk-x11-2.0.so.0+0x5173f] gdk_display_open+0x3f
    #
    # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try “ulimit -c unlimited” before starting Java again
    #
    # An error report file with more information is saved as:
    # /root/Tools/eclipse/eclipse/hs_err_pid4447.log
    #
    # If you would like to submit a bug report, please include
    # instructions on how to reproduce the bug and visit:
    # http://icedtea.classpath.org/bugzilla
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.

    To solve this issue you may add the following lines into eclipse.ini
    -- launcher.GTK_version
    2

    Once you have saved the changes, your Eclipse will run properly

    Solution for problem when running Eclipse Luna SR2 (4.4.2) on Linux