dhclient in Ubuntuကၽြန္ေတာ္ Vmware ေဆာ႔ဖ္၀ဲကို အသုံးၿပဳၿပီးေတာ႔ Ubuntu 9.04 Desktop Version ကို စမ္းသပ္ သုံးစြဲၾကည့္ပါတယ္။ vmware မွာ network ကို Bridge Mode မွာထားသုံးတဲ႔အတြက္ Network ကို configure လုပ္စရာ မလိုေတာ႔ပါဘူး။ windows မွာ network , Internet သုံးလို႔ရေနရင္ ubuntu မွာလည္း ရပါတယ္။ ဒါေပမယ္႔ တစ္ရက္မွာ vmware နဲ႔သုံးထားတဲ႔ ubuntu မွာ Internet သုံးလို႔မရေတာ႔ဘူးျဖစ္သြားပါတယ္။ Firefox မွာ ဘယ္လိုျပသလည္းဆိုေတာ႔ Server is refusing your connection ဆိုၿပီးျပလာပါတယ္။ ဒါေပမယ္႔ ကၽြန္ေတာ္႔အတြက္က ဒီ error ကိုရိုးေနပါၿပီ။ ဘာျဖစ္လို႔လည္းဆိုေတာ႔ Ubuntu ကို Properly Shutdown မလုပ္မိတာေတြအတြက္ပါ။ အခုကၽြန္ေတာ္ အဲဒီ error ကို ဘယ္လိုေျဖရွင္းသြားသလည္းဆိုတာကို ေျပာျပမွာျဖစ္ပါတယ္။
ပုံ (၁)

Application – Accessories ထဲက Terminal ကိုသြားပါ။ ၿပီးရင္ Terminal ကို ကလစ္လုပ္လိုက္ပါ။
ပုံ (၂)

Terminal ထဲမွာ dhclient (DHCP ေတာင္းခံတာ) ဆိုတဲ႔ command ကို ရိုက္ထည့္ပါတယ္။ ဘာလို႔ ဒီ command ကိုရိုက္ထည့္တာလည္းဆိုေတာ႔ကာ ကၽြန္ေတာ႔ဆီမွာ Ubuntu Server 9.04 မွာ Squid Proxy ထိုင္သုံးထားပါတယ္။ အဲဒီအတြက္ေၾကာင္႔ client က ဆာဗာဆီမွာ IP ေတာင္းခံတာျဖစ္တဲ႔ dhclient ဆိုတဲ႔ command ကိုရိုက္ထည့္ရျခင္းျဖစ္ပါတယ္။
အဲဒီအခါမွာ အေပၚမွာျပထားတဲ႔ error message ေလးကို သြားေတြ႕ရပါတယ္။ ဒီလိုပါ။
Cant' create /var/lib/dhcp3/dhclient.lease : Permission denied ဆိုၿပီး ျပလာပါတယ္။ သေဘာက ခင္ဗ်ားမွာ Permission မရွိဘူးဆိုတဲ႔ အဓိပၸါယ္ေပါ႔။ ဘာျဖစ္လို႔ Permission မရွိတာလည္း။ Permission ရွိေအာင္ ဘယ္လိုလုပ္မလည္း။ ဘာေၾကာင္႔ Permission မရွိသလည္းဆိုေတာ႔ ခင္ဗ်ားလက္ရွိသုံးေနတာသည္ (Root (administrator)) မဟုတ္လုိ႔ပါတဲ႔။ အဲဒီေတာ႔ Permission မရွိပါဘူး။ ကဲ အခုဆုိရင္ Root အေနနဲ႔ ၀င္ၾကည့္ၾကရေအာင္ဗ်ာ။
ပုံ (၃)

Root အေနနဲ႔ ၀င္သုံးဖို႔အတြက္ su –l ဆိုတဲ႔ command ကို ရိုက္ထည့္လိုက္ပါတယ္။ Password ေတာင္းပါမယ္။ ထည့္လိုက္ပါ။
smartnet@smartnet-desktop:~$ su –l (ဒီ command သည္ super user (root) အေနနဲနဲ႔ ၀င္သုံးဖို႔ျဖစ္ပါတယ္။)
Password: (password ကိုရိုက္ထည့္လိုက္ပါ။)
Su: Authentication failure (ဒါက Permission မရွိဘူးဆိုတဲ႔ အဓိပၸါယ္ပါ။)
ပုံ (၄)
အဲဒီေတာ႔ root user အေနနဲ႔၀င္ဖို႔ႀကိဳးစားၾကရေအာင္။

အေပၚမွာျပထားတဲ႔ ပုံကိုၾကည့္ပါ။အေပၚကေနေရရင္ (၄) ေၾကာင္းေျမာက္ပါ။
smartnet@smartnet-desktop:~$ (sudo passwd root) ဆိုတဲ႔ command ေလးကို ရိုက္ထည့္ပါ။
[sudo] password for smartnet: (password အေဟာင္းကိုရိုက္ထည့္ပါ)
Enter new UNIX password: (password အသစ္ရိုက္ထည့္ပါ)
Retype new UNIX password: (ခုနတုန္းက ရိုက္ထည့္လိုက္တဲ႔ password ကိုျပန္ရိုက္ထည့္ေပးပါ)
အဲဒါဆိုရင္ ေအာက္မွာျပထားတဲ႔ပုံအတိုင္းေပၚလာပါတယ္။
Passwd: password updated sucessfullyအဲဒီလိုေပၚလာပါလိမ္႔မယ္။
ပုံ (၅)

dhclient command ကိုအသုံးျပဳၿပီး DHCP Server ဆီကေန IP ေတာင္းခံပါေတာ႔မယ္။ အဲဒီလိုလုပ္ဖို႔အတြက္ super user (root) နဲ႔၀င္ရပါမယ္။အေပၚပုံမွာ ျပထားတဲ႔အတိုင္း ၃ ေၾကာင္းေျမာက္က စၾကည့္ပါ။ supers user (root) နဲ႔၀င္ဖို႔အတြက္
smartnet@smartnet-desktop:~$
su –l ဆိုတဲ႔ command ကို ရိုက္ထည့္ပါတယ္။ ၿပီးရင္ Password ထည့္ပါတယ္။ အဲဒီအခါမွာ -
root@smartnet-desktop:~# (အဲဒါဆို root user အေနနဲ႔ျဖစ္သြားပါၿပီ။အဲဒီေတာ႔ dhclient ဆိုတဲ႔ command ကိုသုံးပါမယ္။
root@smartnet-desktop:~#
dhclient (Server မွ IP လွမ္းေတာင္းပါၿပီ။) ေအာက္မွာျပထားတဲ႔အတိုင္းေပၚလာပါမယ္။
There is already a pid file /var/run/dhclient.pid with pid 3629
Killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/pan0/0a:b0;4c:be:fa:3d
Sending on LPF/pan0/0a:b0;4c:be:fa:3d
Listening on LPF/eth0/0a:b0;4c:be:fa:3d
Sending on LPF/eth0/0a:b0;4c:be:fa:3d အဲဒါေတြၿပီးရင္
ifconfig eth0 နဲ႔ IP ရမရ ၾကည့္ႏိုင္ပါတယ္။
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PS: ျဖစ္ႏိုင္ရင္ မလိုအပ္ပဲ အေၾကာင္းမရွိပဲ root နဲ႔ မ၀င္ပါနဲ႔။
ဒီေတာ႔ ကိုယ္ျပင္ဆင္စရာရွိတာ ျပင္ဆင္ၿပီးသြားရင္ root အေကာင႔္ access လုပ္ခြင္႔ကို ပိတ္ထားလိုက္ပါ။ ဘယ္လိုပိတ္သလည္းဆိုေတာ႔။
sudo passwd -l rootျမန္မာအဂၤ်င္နီယာ ဖိုရမ္တြင္ေဖာ္ျပၿပီး။