Thursday, June 28, 2012

How to change hostname in Solaris 10

Step 1: Update /etc/hosts newsolaris

Step 2: Change /etc/nodename
echo "newsolaris" > /etc/nodename

Step 3: Update /etc/hostname.
echo "newsolaris" > /etc/hostname.e1000g0

Step 4: Set the hostname using uname
uname -S newsolaris

Step 5: Reboot the system

Tuesday, September 8, 2009

Using Screensaver as Wallpaper on your Linux desktop

This is a interesting post I found on internet.. adding to my collection..
Credit goes to:

Nautilus draws the desktop (including the icons) for you in gnome by default. We have to tell it to stop doing that, so we can do the matrix animation in its place. Nautilus can be configured using gconf.
gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop false
Now that we have the desktop to ourselves, let us ask xscreensaver ‘glmatrix’ to start drawing itself in the desktop window (’root’ window).
/usr/lib/xscreensaver/glmatrix -root
If you want the animation every time you log in, open “~/.config/autostart/glmatrix.desktop” in your text editor and paste the following.
[Desktop Entry]
Name=No name
Name[en_IN]=Desktop matrix
Exec=/usr/lib/xscreensaver/glmatrix -root

After playing around, if you want to get back to your default desktop, do
gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop true && nautilus

Friday, August 29, 2008

sendmail problem on RHEL Linux

mail command wasn't sending the mail with following error:

[root@host1]# mail -v -s test tbabar
fprintf.c:50: SM_REQUIRE((fp) != NULL && (fp)->sm_magic == (SmFileMagic)) failed

From the /var/log/maillog it was found that:
sendmail[8698]: m7TB22jG008698: SYSERR(root): queueup: cannot create queue file ./qfm7TB22jG008698, euid=51, fd=-1, fp=0x0: No space
left on device

Made some free space on /var, after which mail started working.

mail command wasn't showing any error but also wasn't sending mail.
/var/log/maillog was showing:

sendmail[8656]: m7TEbgoL008656: SYSERR(root): collect: Cannot write ./dfm7TEbgoL008656 (bfcommit, uid=0, gid=51): No such file or dir

It was found that the problem was due to 'sendmail' binary permission problem, removed 'write' permission of owner & it started working. This is bit strange but....

#which sendmail
# ls -l /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 Aug 29 14:12 /usr/sbin/sendmail -> /etc/alternatives/mta
# ls -l /etc/alternatives/mta
lrwxrwxrwx 1 root root 27 Aug 29 14:25 /etc/alternatives/mta -> /usr/sbin/sendmail.sendmail
# ls -l /usr/sbin/sendmail.sendmail
-r-xr-sr-x 1 root smmsp 746328 Jan 22 2007 /usr/sbin/sendmail.sendmail

Note: The permissions required for 'sendmail' files can be found in /usr/share/doc/sendmail/SECURITY file.

Unable to 'su' on RHEL linux

A root user wasn't able to su to any other user. After executing su command neither it will switch to other user nor shell will change.

It was found that this was because corrupted 'su' binary.

[root@lxdevtst ~]# which su
[root@lxdevtst ~]# ls -l /bin/su
-rwsr-xr-x 1 root root 0 Jul 18 11:49 /bin/su

See above, the file size is zero. To resolve this, forcefully installed the 'coreutils' rpm, which provides this binary.

Tuesday, July 8, 2008

How to reset MySQL root password?

If you forgot root password for your MySQL server, you can follow the steps below to reset it.

1. Login to the server as root and stop MySQL service.

# /etc/init.d/mysqld stop

2. Start mysqld_safe service.

# mysqld_safe –skip-grant-tables &

3. Login to MySQL server now. It won’t ask you for a password.

# mysql -u root

4. Set up a new MySQL root user password:

mysql> use mysql;

mysql> update user set password=PASSWORD(”NEW-ROOT-PASSWORD”) where User=’root‘;

mysql> flush privileges;

mysql> quit

5. Restart your MySQL service.

# /etc/init.d/mysqld restart

6. Try to login using new password. It should work fine.

# mysql -u root -p

That’s it !!!

Saturday, May 31, 2008

स्वामी ....

ऐलतीरावर सुख। पैलतीरीं नांदे दुःख ।

मधें वाहतें जीवन । हेंच संसाराचे रूप ।।

ताटातुटीसाठीं का रे । देवा खेळ हा मांडीला ।।

देवपणा सांग त्यांने । तुझा खरा काय झाला ?

विघ्नहर्त्या विनायका । तुला पार्वतीची आण ।

रमा-माधवा संभाळ तुझे आठवीण गुण ।।

रणजीत देसाई यांच्या 'स्वामी' या कादंबरीतून ...

स्वामी ....

आज आकाशाचा डोळा । कशानं ग ओला झाला ।

देव राहिला राउळीं । भाव वनवासी झाला ॥

ध्रुव कसा ग ढळला । चंदनाचा दाह झाला ॥

आज सती जानाकीचा । त्याग रामराये केला ॥

क्षितिजाला दुभगून । रथ जानाकीचा गेला ।

सुकलेल्या आसवांत । राजा आयोध्याचा न्हाला ॥

सदाशिवभाऊ यांच्या पत्नी पार्वतीबाई यांचे हे विरह गीत, रणजीत देसाई यांच्या 'स्वामी' या कादंबरीतले आहे....