Linux
How to bind my mysql server to a specific IP address
Sep 6th
MySQL server contains a file my.cnf in /etc direcory of Linux. This file contains configuration of MySQL server as well as the configuration parameters of the MySQL client.
To make MySQL server listen on a specific IP address, you need to add a line similar to the following with IP address of your choice under mysqld section.
[root@techpulp ~]# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 # To allow mysqld to connect to a MySQL Cluster management daemon, uncomment # these lines More >
How to check status of password for an account in Linux
Sep 4th
The need to check the status of password for an account comes if you have a habit of locking user account based on certain criteria. In another scenario, if have received requests from employees that have their user accounts expired. This scenario occurs if you have an Organization policy of locking user account for certain number of sequential login failures or if an account is unused for certain period.
To check the status of password of an account, you need to use “passwd” command as shown below.
[root@techpulp ~]# passwd -S mark mark PS 2009-01-21 0 99999 7 -1 (Password set, unknown More >
How to read Microsoft Windows .chm help files in Linux
Sep 2nd
It is sometimes required to read Microsoft Windows help files (.chm) in Linux. Once such case could be for cross developing applications using MinGW for Windows in Linux. Another case could be reading documentation of a generic stuff like JavaScript programming etc.
Linux supports a command called “xchm” that can be used to view .chm files. You can install it using “yum” command in Fedora/RHEL Linux as shown below.
[root@techpulp ~]# yum -y install xchm
After successful installation you should see a new command xchm available.
To open a .chm help file, use following command.
[neo@techpulp ~]# xchm jquery.chm
There’s a KDE version of CHM file viewer More >
How to create passwordless account in Linux system
Sep 1st
First of all, you should know that creating a password-less account is a very bad idea. You should be knowing what you are doing before doing so. However this may be of use in certain scenarios like doing SSH or Telnet to a virtual machines created using Virtualization software like VMWare, KVM, Microsoft Virtual PC etc. In such scenarios you should have a dedicated network adapter for each virtual machine that is accessible to the host machine only. Of course any such management service like SSH, Telnet or FTP should be running only on the adapter accessible to Host system More >
How to unzip files with .7z extension in Fedora Linux
Aug 31st
There is an open source tool named 7zip which creates compressed files with .7z extension. Fedora Linux provides a package in its repository to install the application. First of all, you need to install “p7zip” package in the system as shown below. You need to login as root and the system should have an active Internet connection so that “yum” tool can download from Fedora repository to install 7zip in your system.
[root@techpulp ~]# yum -y install p7zip
If installation is successful, you should see a command with name “7za“.
You can the command 7za to uncompress a file with .7z extension as More >
How to show desktop pop-up notification in Linux using notify-send command
Aug 27th
It is very useful when you are about to start a bulk job and want to get notified asynchronously after its completion. That helps you continue with other work without having to check for its completion periodically. Of course if you don’t have any other work, you can at least play few games without bothering about the job completion.
There is a command in Linux called “notify-send” that can be used to generate a desktop notification from command line or a script. However where exactly this notification message appears depends entirely on the desktop you are using. For example, if you More >
How to configure a network interface in Linux
Aug 27th
Linux provides “ifconfig” command to configure network interfaces.
To display list of available interfaces:
[root@techpulp ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:65:23:5E:D4:3C inet addr:192.168.191.1 Bcast:192.168.191.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:261958 errors:0 dropped:0 overruns:0 frame:0 TX packets:201967 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:322195982 (307.2 MiB) TX bytes:18627969 (17.7 MiB) Interrupt:21 Base address:0x2000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:240 (240.0 b) TX bytes:240 (240.0 b) [root@techpulp ~]#
To bring down an interface “eth0″:
[root@techpulp ~]# ifconfig eth0 down
To More >
How to lock and unlock an user account in Linux
Aug 25th
Any user account can be locked or unlocked only by Administrator (i.e root user). This is done using passwd command as explained below. When an user account is locked, Linux sets a irrecoverable password for that account so that login always fails. However Linux still stores the original password of the account before locking so that unlocking such account retains its original password.
To lock a user account (liz) from logging in:
[root@techpulp ~]# passwd -l liz Locking password for user liz. passwd: Success [root@techpulp ~]#
To unlock a user account (liz):
[root@techpulp ~]# passwd -u liz Unlocking password for user liz. passwd: Success [root@techpulp More >
How to get standard 80×25 console instead of SVGA console in Fedora Linux
Aug 24th
If you want to get good old 80×25 console in text mode of Fedora, you need to pass “nomodeset” option to the kernel.
Open the file /etc/grub.conf or /boot/grub/grub.conf file and “nomodeset” option to the “kernel” line of the active boot entry.
kernel /vmlinuz-2.6.28.24 ro root=/dev/sda2 rhgb quiet nomodeset
How to disable graphical boot in Fedora
Aug 23rd
To disable graphical boot in Fedora, you need to modify system configuration.
Open the file “/etc/sysconfig/init” and change the line “GRAPHICAL=yes” to “GRAPHICAL=no“. This only disables Fedora from using graphics mode during start up. So Fedora shows the text bar during start up.
However if you want to disable graphical login screen and move to text mode completely, you need to edit the following line in “/etc/inittab” file.
Change
id:5:initdefault:
to
id:3:initdefault:
In the above line, “5″ means graphical mode login and “3″ means text mode login.


Recent Comments