sudo – How to create another root (equivalent) account on linux or freebsd

bsd-daemon-tux-logo


The usual root account are meant for critical task, such as single user mode related operation. It hails the power of the system, as well the power of destruction (try “rm -rf /” :p). That’s the reason why a lot of company have a policy to seal the root account or make some red tape so that one will give up requesting to use it. But sealing the root account will make daily routine system administration task difficult to execute.


No worries, sudo is the tool to clone another account with root privilege or control the access of critical command of a linux or BSD box. Every command that runs through sudo will be log to /var/log/auth.log.


Read More »

Wordpress – missing tool bar from visual editor after upgrading wordpress

wp-logo


WordPress 2.8 is available for upgrade from either the Dashboard (by 1 click upgrade) or manually download it from wordpress.org and install it through command line. If you are using the first option, which upgrade through the Dashboard, you might noticed that after the upgrade, the Visual Editor might stop working or the tool bar is missing from the Visual Editor. Google it will bring you to wordpress.org and recommand you to do some tedious troubleshooting steps.


This blog have just upgraded and encounter the same problem. After following the recommendations, step 3 of it works, which is removing the current wp-includes and wp-admin folder then replace it with the latest version of it by downloading latest.tar.gz from wordpress.org and extract from it.

Ciao !!!

Ubuntu – How to add or create hard disk partition and make it automatically mount

ubuntu-logo


In Ubuntu, adding or managing new partition or hard disk should use UUID (Universally Unique Identifier) of the device rather then using the device node name. e.g. /dev/sda2, /dev/hda3, /dev/sda5 and etc. IMHO its advantage compare to the conventional way of mounting device, using /dev/sda or /dev/hda are :


  • UUID is unique when it comes to device node naming. e.g. multiple USB device plug in and out can generate different /dev/sda nodes.
  • UUID have been used by ubuntu by default to assign partition or hard disk in /etc/fstab.
  • UUID have 25616 of combination and it takes a very long time to exhaust it even though if we were to generate it fast enough. e.g. generating 1 trillion a nano second would take 10 years to exhaust it.
  • using UUID will list the partition or hard disk to appear in the ‘File Browser‘ (aka Nautilus) under ‘Places‘.


This post will list 2 ways to get the UUIDs in order to make the new partition or hard disk automatically mount under Linux (or particularly Ubuntu), the command line and the GUI (Graphical User Interface) programs provided by Ubuntu.


Read More »

Start multiple command line screen session to run interactive jobs

gnu-logo


As an BSD & Linux administrator, the command line is where we live. We eat, live & shit at the same place, command line screen. Some times, we can only afford to open a single terminal screen. It’s kind of hard for us to be efficient as most of the time we multitask on a few bunch of screens.


Or, we need to run an interactive program over a long period of time which we want the result when it ends. Instead passing the program to run in the background which hides the result, the screen command is at disposal.


And most importantly, when combine with ssh (secure shell) it is uncomparablely fast and secure.


Screen is capable to detach from command line session and yet the program runs interactively in the background. The ability to switch from multiple screen will definitely help out when using the console session. Screen can even start in a few “screen session” in order to manage your task into separate groups. Screen also supports hot key (the meta control key with the combination of alphabet or digit) for common task.


Part I will guide any first time screen user on how to start a multiple screen command line to run multiple screen session. Proceed to Part II for a more advanced experience.


Read More »

MySQL – Common commands of database user account management

mysql-logo


SQL database are used to store various kind of data in order for future retrieval. But data stored in SQL database is not only for future retrieval, it is also stored in such a way for faster (repeated) retrieval, structured manner in data organization, interchangeable between applications and most importantly, it provides a mean to store and search for really huge data by using SQL statement, query.


There are a lot of database currently available, e.g. PostgreSQL & MySQL. MySQL is one of the most popular database among open source database, same as PostgreSQL. Due to the hip of LAMP (which denotes Linux, Apache, MySQL, PHP), MySQL have made known to the mass audience. No doubts its performance and usability are, both MySQL & PostgreSQL, in par.


This post will not attempt to compare both excellent databases, rather, it will try to list out a few common uses of MySQL database in tips & shortcut way. Below are the list of common usage of MySQL permission and privileges :


Read More »

ssh – error “Host key verification failed” when trying to connect or copy a file to ssh server

ssh-logo


The below error was display while trying to ssh or scp to a ssh server :



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for domain-name.com has changed,
and the key for the according IP address xxx.xxx.xxx.xxx
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
00:00:00:00:00:00:00:00:00:00:00:00:.
Please contact your system administrator.
Add correct host key in ~/.ssh/known_hosts to get rid of this message.
Offending key in ~/.ssh/known_hosts:xx
RSA host key for domain-name.com has changed and you have requested
strict checking.

Host key verification failed.

lost connection


Read More »

Nokia E71 and E63 tips and short cut keys

qtip-blue


Nokia E71 and E63 are great phones, operating on Symbian S60 series operating systems. Its keyboard is easy to type, the LCD is sharp, the keys position are great and most importantly, the battery last long enough, approximately 5-7 days for an average user like me. The phone also comes with a lot of practical applications, e.g. word processor, spreadsheet, simple note pad, email client and etc.


The phone’s operating systems is also able to upgrade from a normal PC or laptop with USB connectivity. The last upgrade my phone had have significantly improve the responsiveness and also some functionality. e.g. typing the phone book entry on the Home Screen will directly search for it (rather the usually need to access the phone book before able to search), press shift twice will activate the secondary input language and others.


But this post is about tips and shortcut keys available on the phone, below are some of it discovered along using the phone all this while :


Read More »

OpenOffice crashes after fail to recover documents

openoffice-logo


When launching openoffice, it starts to recover some files which previously did not save properly. After it recovers, it just display a message saying it needed to close due to some unexpected error. After retrying to start a few more times, the result is still the same. Reset the profile by using the below instructions :


Read More »

How to check user’s information and profile

qtip-red

Other then digging /etc/passwd, there are other ways to check a user’s profile on the server. “finger” can also do the same job.

e.g.

finger username

Arrivederci !!!

mkdir – make a whole set of directory, automatically if it does not exists

qtip-red


When organizing files, we often need to make a whole set of directories in order organize the files properly into directories. Most of the time, we will need to make a bunch of sub directories.


e.g.

cd /directory” then “mkdir leve1“, then “cd /directory/level1” then “mkdir level2“, then “cd /directory/level1/level2” then “mkdir level3” and etc… In fact, there is a parameter for mkdir to create the whole set of directory, automatically.


Read More »

Please sponsor my coffee if you find my posts worth reading, thanks!


-->
Improve the web with Nofollow Reciprocity.