Category Archives: Linux

stop dhcpcd client in slackware

Published by:

If we use dhcp (dynamic host configuration protocol) in our slackware then the machine automatically getting the ip from the server and use it.
The program that run this function is dhcpcd.
But sometime when we decide to use static ip and configure it in /etc/rc.d/rc.inet1.conf
the static setting won’t work. It is because the dhcpcd still running in memory.

So we need to shut it down. here’s how.
root@user:#/sbin/dhcpcd -x eth0

Now try to restart rc.inet1.conf again
root@user:#/etc/rc.d/rc.inet1 restart

The machine should use the static ip now.

samba security = share and user

Published by:

Samba is one of the transfer protocol in linux network. Samba can connect linux data server with windows. In my opinion, the setting is quite easy. In my earlier posts I have written many posts about samba. Now in the samba setting there is another option that can make a different to the sharing method. The option is security = user and security = share.

Let’s talk about security share option.
If we use this option in smb.conf then every sharing directory declared in smb.conf will be share without any username privileged.
But the sharing setting must be set browseable=yes ; rewritable=yes ; guest ok = yes

Now the security user option.
If we use this option in smb.conf then everytime the client try to browse the share directoy it will prompt for username and password of the owner directory.
The sharing setting must be set browseable=yes ; rewriteable = yes ; guest ok is not really necessary.

In My opinion the samba security = share is faster than security=user, but why?
I think this is because share is ignoring all the privileged.

fix flash mbr

Published by:

Sometime our flash usb drive is error without knowing the cause. The master boot record (MBR) is damaged or corrupted.

We can recover the mbr by copying the mbr.bin available in slackware directory into the flash drive. This is amazing isn’t it. Slackware keep mbr record inside its original installation.

This is how to copy the mbr.bin to the flash. Sdb1 is the flashdrive node recognition by slackware, the location in my slackware 13.1 is in /usr/share/syslinux/mbr.bin

dd if=/usr/share/syslinux/mbr.bin of=/dev/sdb1

504 Gateway Timeout

Published by:

I received the 504 error gateway timeout without knowing what is going on. Maybe because I create too many sub domains with plugins installed or what.

Here are the explanation from source :

HTTP Error 504 - Gateway Timeout"

The 504 Gateway Timeout error displays inside the Internet browser window, just as web pages do.
Cause of 504 Errors
The 504 Gateway Timeout error is an HTTP status code that means that one server did not receive a timely response from another server that it was accessing while attempting to load the web page or fill another request by the browser.

This usually means that the other server is down or not working properly.
The 504 Gateway Timeout error is usually a network error between servers on the Internet or an issue with an actual server, meaning the problem is not with your PC or Internet connection.

Even though the issue is not yours to troubleshoot or resolve, there are a few things you can do:

Retry the web page by clicking the refresh/reload button or trying the URL from the address bar again. Even though the 504 Gateway Timeout error is reporting an error outside of your control, the error may only be temporary.

Trying the page again will often be successful.

Come back later. Since the 504 Gateway Timeout error message is an issue with the web site's network or a server that it communicates with, everyone visiting this site is probably experiencing the same problem as you.

Chances are an issue like that has already been brought to the attention of an administrator at the web site and someone is working to resolve it.

If you can't wait any longer for the problem to be resolved or if you'd like to help out, you may want to attempt to contact the webmaster or another website contact yourself and advise them of the 504 Gateway Timeout error you are receiving.

So it could not because of sub domains. But I already delete some of them. hmh….

barcode generator from open office

Published by:

Open office has a plugin for printing barcode directly from it. Barcode is necessary to print id’s for products or items that we need in our store or something.

just install the extention barcode 1.3.1 (the current version) or download it here.

To install it, go to Tools – Extension Manager – Add. Choose the plugin we saved before.

Then use office draw, go to insert and barcode. This barcode plugin is only show in draw menu anyway. Not in writer or calc. So don’t confuse about it.

installing easyhotspot ubuntu in virtualbox

Published by:

Well i am interesting to install easyhotspot in my office. Yes, i have imagined it since years ago at the first time i handled the network. I want to manage all the computer in the office using username and password just like I found in the cafetaria or mall in bandung. They offered free hotspot. That’s what I need in my office. I hope the system could go commercial, so students can pay extra to use the facility.

Alright first I need to do exactly the same with the tutorial i found above so i can understand how it works. I used ubuntu 9.04 as my platform and using virtualbox 3.2.6. The easyhotpot I have is the one wit h ubuntu 9.04 iso. Actually it came with a live cd but I use installation into the hard disk instead.

I m using virtualbox because i have one network card in my pc and i want to know how it works first efore installing it into the stand alone cpu.

The installation is quite easy, just need to create another network card as a bridge in virtualbox. Virtualbox called it eth0. And another one as NAT. Then boot from easyhotspot iso and install them. Everything will run as it should be.

AFter it finished, we need to configure the network address. Go to System – Administration – Network. Choose eth1 and configure as static ip, fill with the same ip from the cpu we use. Let’s say the cpu with ubuntu use then fill it with that ip.

Restart the ubuntu. Now the easyhotspot should work. We can see the easyhotspot by typing a command ipconfig to find out the easyhotspot ip. You will find ip like 192.168.182.x then we go to the right direction.

Try to browse with the browser to any address, but you will be redirected to white login page. That’s it easyhotspot is running.

To configure the user and the password and everything, go to the browser and type http://localhost/easyhotspot use user admin with password admin123. Add user login as you wish and change the setting as you like. And don’t forget to do it all inside the ubuntu in virtualbox. Not in ubuntu host of virtualbox.

I found another problem running easyhotspot here, I will write it another time.

source :

ubuntu 10.10 installation in intel vga 4 series

Published by:

Again, I try to figure out how to install ubuntu in intel chipset. First time installation was successful. But then the error show up.
Then I re-install ubuntu in different way.

Install ubuntu 10.10 in text mode.
Once it finished, edit grub and adding i915.modset=0

Go to recovery mode
$sudo add-apt-repository ppa:glasen/intel-driver
$sudo apt-get update
$sudo apt-get install xserver-xorg-video-intel

Reconfigure xorg.conf
$sudo dpkg-reconfigure –phigh xserver-xorg
Copy the to /etc/X11/xorg.conf
Find out in the section device for the driver, is it intel or what.
$sudo nano /etc/X11/xorg.conf
Add the HorizSync and VertRefresh if necessary in monitor section.
Ctrl-x to save xorg.conf
Restart the computer. See if it works.

source :

Or force ubuntu to use vesa.
add -vesa into the boot parameter.
source :

Here are the steps I made and it worked on mine
1. Install maverick with text mode without ubuntu-desktop. I install it later on.
2. Adding i915.modeset=0 to boot parameter.
3. install ubuntu-desktop
4. force to use xorg.conf
5. change the intel driver to vesa in xorg.conf
6. add the necessary option for the monitor
7. it works.
Vesa is always the best ^_^

ubuntu using cdrom to apt

Published by:

I don’t know for sure why my ubuntu can’t install program from apt of the cdrom. I take a look into sources.list and the cdrom is not in there. So I need to add the deb source of the cdrom into it.
After browsing a while, randomly I found a command like this
$sudo apt-cdrom add
It will automatically mount the cdrom/dvdrom into /media/dvdrom and then add the content into the apt/sources.list
then next time we do apt-get update the cd is included.
So that’s how we can use cdrom as our repository.
Maybe delete all the other sources and using cdrom only.
hmh.. it won’t need internet connection though.

at command – timer command

Published by:

I just curious of a process in my office. I should change a rule in squid for just 30 minutes. But I have not find anything that related to it. I know squid can arrange some time to run some rule. But what I mean here is the change is accidentally occur. Squid timer is defined.
Example :
acl blokir dstdomain “/etc/squid/blokir.txt”
acl waktu time MTWHFAS 07:00 – 08:00
http_access deny localnet blokir waktu

That mean, squid will run blokir command to block something from monday through sunday at 07:00 til 08:00. Squid will not blocking from 08:00 through 09:00 for example.

So i search in google and found at command here.
Here what it use
$at 0701
0701 means at 07:01 o’clock.
The screen will change to > and there is a warning said all the command will be execute with /bin/sh
Press ctrl+D. The at command wills ave the script.
Here is the example of my script
echo “my script”
at command will execute script that run echo command at 07:01 am.
at will memorize each job with number. To see the list
$at -l
To remove it
$at 3
Mean job number 3

In Ubuntu or any linux, sometime root privilege is important when connecting to root specific command. So do at command in root privilege.
In ubuntu
$sudo at 0700
in slackware
root@user$at 0700

That’s it, this command is useful for me.

split – file splitter in slackware konsole

Published by:

A good thing about slackware is he has lots of functional command that in many linux doesn’t have.
I mean the other linux needs to install another program while slackware already has it inside the original installation.
Like this split command. It means it can split large file into pieces.
Here is the manual

Usage: split [OPTION]… [INPUT [PREFIX]]
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, …; default
size is 1000 lines, and default PREFIX is `x’. With no INPUT, or when INPUT
is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.
-a, –suffix-length=N use suffixes of length N (default 2)
-b, –bytes=SIZE put SIZE bytes per output file
-C, –line-bytes=SIZE put at most SIZE bytes of lines per output file
-d, –numeric-suffixes use numeric suffixes instead of alphabetic
-l, –lines=NUMBER put NUMBER lines per output file
–verbose print a diagnostic just before each
output file is opened
–help display this help and exit
–version output version information and exit

SIZE may be (or may be an integer optionally followed by) one of following:
KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.

Report split bugs to
GNU coreutils home page:
General help using GNU software:
For complete documentation, run: info coreutils ‘split invocation’

This is the example of the splitting process

$split -b 100M largefile.tar.gz

There will be lots of file named like xaa xab xac and so on.
Because split is a simple command, we need to modify it a little bit. It splits files in the current folder, maybe we will have a difficulty to deliver a lots number of the results. So let’s create temporary folder and split the file inside it.
Another my own script might work to do that instantly. But I have not write it down here. Maybe some other time hehe