How to reset lost root password on SUSE Linux Enterprise Server

I had to use one of my virtual machines that I didn’t use for a while today, and of course  I couldn’t remember the password I used for it, so I had to change it.

Here is how to reset a forgotten root password on Novell SUSE

This is a guide for Novell SUSE Linux Enterprise Server 10 SP3.

On the boot menu select the first option “SUSE Linux enterprise server” and press ‘e’ for edit.

SLES boot menu
SLES boot menu

On the second menu select the kernel option and press ‘e’ for edit.

Select kernel line
Select kernel line

type init=/bin/bash (leave empty space at the begging), and press ‘Enter’ and then ‘b’ to boot with that option.

Add init=/bin/bash one the end of the line
Add init=/bin/bash one the end of the line

The system will boot with the root user logged on, type passwd to change the password and input your new password, or just press ‘Enter’ for no password (blank password)

Use passwd to change root password
Use passwd to change root password
Reboot the server and log on with your new password.

How to install MySQL through YaST

This is a repost of a post from an old blog, made on January 9, 2012, that used to be on:

Original post:

I was looking into Novell Service Desk as solution for our Help-desk department today, so i decided to test it by installing it on a single machine together with a MySQL server to act as its database. It’s been a few years since the last time I installed MySQL, last few years I’m mostly working with Informix and MS SQL.

I just wanted it installed as soon as possible so I decided to install the it through YaST thinking it would be faster, but neglected the fact that YaST scatters the installation through several directories so I spend some time locating the files. So this are the short instructions for those who decided to do it with YaST. I was installing on SUSE Linux Enterprise Server 11 SP1

  1. Open YaST(just type yast in terminal)>Software>Software management(use Tab button to move between sections), or go straight to Install Software on main menu if you’re working through GUI
  2. In the search filed type mysql and press Enter or Search
  3. Select mysql package, mysql-client will be selected also automatically also, and press Accept to install them.
    (mysql user and mysql group will be created automatically, so you don’t need to do that)If you want to find out where did YaST installed all the files, you can do that either through the terminal with rpm -qal mysql command, or if you’re working through the GUI by opening YaST, typing mysql i search box and selecting mysql package. On the File List tab you can see where all the files are installed.

  4. Edit the /etc/my.cnf file, by adding user=mysql after the [mysqld]
    your file should look something like this:

     user = mysql
  5. Crate a mysql database with the following command:
    /usr/bin/mysql_install_db –user=mysql
  6. Start your server with:
    /usr/bin/mysqld_safe –user=mysql &
  7. Check if the server is running with:
    /usr/bin/mysqladmin version
    You should get information about the software version.
  8. Connect to your MySQL server with:
    /usr/bin/mysql -u root
    You should get the mysql> prompt if everything is okay.


There are other ways to install MySQL besides YaST, if you would like to install MySQL from source you can check this blog