Open Suse root password lost after old Admin left company Open Suse 12.3

I have no idea how to get to the place in grub to enter init=bin/bash

I can boot into recovery mode but it seems useless

I remember I watched a linux video in which it says if grub is not password protected you may get root access by modifying grub, something like adding “1” at the end of a sentence. :stuck_out_tongue: But I can’t remember the detail.

Press e at boot menu find the line that starts with linux go to end of line (note it is a long line best to just press end key) enter space and the parameters press F10 to continue boot

What do you men recovery mode is useless? in what way?? Changing root password. Yep if you don’t know it you can’t change it in that mode. it is ment to load with minimum drivers not to get around need to be root for system changes. init=bin/bash will get you where you want to go. easiest to run yast and change the password there but you can also use command line.

Even if you boot to runlevel 1 (by adding “1” to the boot options), you still would have to enter the root password.

But you can add “init=/bin/sh” to get into a minimal system without the need of any password. You should be able to change the root password then by just running “passwd”.

To do this in case of grub1 (recognizeable by an input line at the boot menu) just enter that at the boot menu.

For grub2, press ‘e’ at the boot menu, search for a line starting with “linux” and append it to the end, then press ‘F10’ to boot.

Can you be more specific?

The only line I see with the word linux is "linux /boot/vmlinuz-3.7.10-1-desktop

It is very tedious to transfer copy by hand the whole thing.

Yes, that is the line. Go to the end of it by pressing your END key, add a space, then type init=/bin/sh

and then continue the boot.

Hi wolfi323,

I just checked the video (linux basic courses) again, it is said when you add “1” or “single” at the end of kernel line, you would automatically login as root without need of any password. The speaker showed it on a CentOS in a virtualbox. The video is about 2 years old though.

Has the policy changed for grub or it depends on the linux distribution? Grub is independent from distros right?

Grub is distro independent, yes. (aside from specific patches that may have been added)
But this is not a grub feature, but a feature of the init system (sysvinit, systemd). Grub only passes the command line over to the kernel.

And the runlevel setup is of course distribution specific.
I’m not sure atm how runlevel 1 was setup in earlier openSUSE versions, but in 13.1 (and I’m quite sure in 12.3 as well) it is just a symlink to rescue.target which needs the root password.
From “man sulogin” (that’s what rescue.target uses)

NAME
       sulogin - Single-user login


SYNOPSIS
       sulogin [options] [tty]


DESCRIPTION
       sulogin is invoked by init when the system goes into single user mode.


       The user is prompted:


            Give root password for system maintenance
            (or type Control-D for normal startup):


       sulogin  will  be connected to the current terminal, or to the optional
       tty device that  can  be  specified  on  the  command  line  (typically
       /dev/console).


       After  the user exits the single-user shell or presses control-D at the
       prompt, the system will continue to boot.

According to that desription I would say that single user mode should need the root password in any case on any distribution (provided the same sulogin is used of course)

On 2014-02-21 12:26, bonedriven wrote:

> I just checked the video (linux basic courses) again, it is said when
> you add “1” or “single” at the end of kernel line, you would
> automatically login as root without need of any password. The speaker
> showed it on a CentOS in a virtualbox. The video is about 2 years old
> though.

Never worked on openSUSE, AFAIR.

> Has the policy changed for grub or it depends on the linux distribution?
> Grub is independent from distros right?

Grub doesn’t matter here, it is the system.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Thanks that worked like a charm. Now I need to figure out how to reset the password to nagios
in order to utilize it to monitor my servers.

Anyone know where hosts.cfg is in nagios and how to add hosts to it?

You may want to post in the Network/Internet subforum for this.