Accessing windows file sharing in Linux

Well, my Dev team mate have a Linux server for build some projects, and they wanted to access their files from Linux by remote/konsole mode, in this case their files are on Windows. So, here are their files sharing on Windows system.

As you can see above, we will access on those folder Autogenerated and Resources. So, here's the step to make it accessible from Linux.
Installing a requirements packages
# apt-get install cifs-utils

After that then go to /etc/nsswitch.conf and edit it:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

add "wins" on that line
hosts:  files mdns4_minimal [NOTFOUND=return] wins dns mdns4

If winbind is not installed on Linux system, please install it by this issue command:
# apt-get install libnss-winbind winbind

Now reload the network to take effect:
# service networking restart

Mounting drive
Backup the fstab configuration to avoid any mistaken in the future.
# cp /etc/fstab{,.old}

Now create a credential user files who will accessing the folder share files on current linux user.
# printf '%s\n' 'username=darm' 'password=******' > .smbuser

Next, we should know the UID and GID on the system. Run the following command
# id programmer
uid=1000(programmer) gid=1000(programmer) groups=1000(programmer),27(sudo),7001(wksadmin)

Create folder for mounting point.
# mkdir /media/prg
# mkdir /media/prg2

Then we open fstab file to start mounting point, and put this line on it.
//Workstation/AutoGenerated /media/prg cifs credentials=/home/programmer/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0
//Workstation/Resources /media/prg2 cifs credentials=/home/programmer/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0

Save your configuration, and reload the fstab
# mount -a

Now let's take a look the result. :D

Debian: installing VLC by compiling from source

In debian wheezy the latest version of VLC is 2.0.6. But, if you want to get the new version of VLC, you can grab it at here to do compiling by yourself.

 $ wget ftp://ftp.videolan.org/pub/videolan/vlc/2.1.4/vlc-2.1.4.tar.xz  

Once you have done downloading the VLC, now please install the required lib packets.

 # apt-get install libavcodec-dev libshout3-dev libsidplayfp-dev libfreerdp1 libvncserver-dev libcddb2-dev libavformat-dev libvlc-dev libmodplug-dev libshout3-dev libgnomevfs2-dev libcddb2-dev libbluray-dev libopencv-dev libsmbclient-raw-dev libssh2-1-dev libdvdnav-dev libdvdread-dev libzvbi-dev libraw1394-dev libdc1394-22-dev liblivemedia-dev libdssialsacompat-dev libfribidi-dev librsvg2-dev libcaca-dev libfluidsynth-dev libass-dev libspeexdsp-dev libtool build-essential pkg-config autoconf liblua5.1-luacsnd5.2 

Extract the archive of VLC using tarball utility:

 $ tar -xvf vlc-2.1.4.tar.xz; mv vlc-2.1.4 vlc; cd vlc 

Make sure you're in directory VLC installation, to configure it please run this command:

 $ ./configure 

or if you want to install in another directory:

 $ ./configure --prefix=/path/to/install/whatever-folder-you-want 
Let's compile the source, this will take a lot of time, be patient. B)

 $ make  
 # make install  
 # make clean  




Now,  VLC 2.1.4 has been installed in your system. Enjoy with the new version! :)


Fixing sh: 1: /usr/bin/gdbus: not found on Debian

When i'm done installing some packets or running "apt-get upgrade" on my machine(currently I use Wheezy), there's a last message comes up like this:

 sh: 1: /usr/bin/gdbus: not found  
So, how to fix that?
It's easy, just install the libglib2.0-bin packet by command below:
 # apt-get install libglib2.0-bin  
That's it, I hope this help.

Reference:
debianforum.de

Automount and R&W EXT4 drives in Debian GNU/Linux

Setelah melakukan fresh install Debian GNU/Linux, hard drive saya yang bertipe EXT4 harus di mount secara manual tiap kali komputer dinyalakan dan juga tidak dapat membaca dan tulis sebuah/beberapa files begitu saja.

Agar hard drive melakukan mounting secara otomatis, Anda bisa menambahkan partisi hard drive yang bertipe EXT4 pada berkas /etc/fstab. Sebelumnya, silahkan cek partisi mana saja yang akan di mounting secara otomatis dengan mengetikkan perintah blkid pada konsole:


Selanjutnya buatlah direktori baru di /mnt untuk melakukan mount point pada hard drive agar dibaca secara otomatis tiap kali mesin linux  di nyalakan.
 # mkdir /mnt/nama_direktori  
OK, setelah direktori baru dibuat, saatnya menyunting berkas /etc/fstab untuk menambahkan hard drive yang sudah kita tentukan sebelumnya.

Mungkin yang menjadi pertanyaan, dari mana mendapatkan UUID partisi hard drive seperti pada gambar diatas? Seperti yang telah disebutkan sebelumnya, untuk mengetahui UUID dari partisi hard drive pada mesin linux bisa dengan menggunakan perintah blkid. Setelah semuanya selesai, silakan save berkas fstab yang telah disunting dan lakukan remount dengan perintah mount -a. Kemudian ubah Owner dari setiap files yang akan di baca dan tulis agar mendapatkan permission pada direktori mount point yang telah dibuat sebelumnya dengan perintah:
 # chown -R namapengguna: /mnt/nama_direktori
and you're done. :)



Quick guide: Upgrade Linux kernel 3.0 on Debian 6.0 (Squeeze)

Pada saat pertama kali Anda menginstall Debian 6.0(Squeeze), secara default versi kernel yang digunakan adalah versi 2.6.32-5-686. Setahun yang lalu, saya juga pernah menulis di blog ini bagimana cara Kompilasi kernel linux di Ubuntu 10.10. Dan pada tulisan kali ini saya akan menulis dengan singkat bagaimana meng-Upgrade kernel pada Debian 6.0(Squeeze) ke versi yang lebih baru yakni Linux kernel 3.0.

Pertama silahkan unduh terlebih dahulu linux kernel 3.0. Dan berikut tahapan-tahapan yang saya lakukan ketika meng-upgrade kernel 3.0.

Ekstrak kernel yang sudah di unduh

$ tar xfvj linux-3.0.tar.bz2


Pindahkan ke direktori /usr/src
# mv linux-3.0 /usr/src/


Install terlebih dahulu beberapa dependensi untuk dukungan kompilasi nantinya
# aptitude install build-essential qt4-dev-tools ncurses-dev


Konfigurasi dari kernel yang akan di compile. Pada pengaturan ini saya membiarkannya tetap default dan pilih Save an Alternate Configuration File, selanjutnya >> Exit
# make menuconfig
# make
# make modules


Jika terjadi error, lakukan seperti berikut
# make CONFIG_DEBUG_SECTION_MISMATCH=y


Instalasi modul-modul kernel
# make modules_install


Instalasi kernel 3.0
# make install


Membuat Initial ramdisk image
# cd /boot
# mkinitramfs -o initrd.img-3.0.0 3.0.0


Rubah pengaturan grub.cfg di /boot/grub/grub.cfg



Perbaharui grub dengan perintah
# update-grub




And finally
# reboot




Selesai !
Selamat menikmati linux kernel 3.0. :)