1

How can I connect to webmin when I do not know the root password.

I have a sudo account that can become root

3 Answers 3

1

If Webmin is actually using the root password as stored in /etc/shadow, then you can sudo to root and change root's password. But if Webmin has it's own password store, and it's password just happens to be identical to the root's password, then changing root's password won't help, and you'll need to get the Webmin password from someone who knows it.

1

Webmin can also be configured to allow users who have sudo privileges for all actions to login as a root-level user.

  1. Browse to Webmin->Webmin Users
  2. Enable the option "Allow users who can run all commands via sudo to login as root"
  3. Save it

Now you should be able to login as any user that has ALL sudo privileges. This feature was added to accommodate systems like Ubuntu that do away with having a "root" account, by default (Ubuntu has a root account, but it has no password and the first user created gets added to the sudoers file automatically).

This option is enabled, by default, on systems that we know meet this description (like recent Ubuntu releases), I think.

0

Assuming you have access to a terminal on the machine as a sudo user (on the console, via SSH etc),

sudo /usr/libexec/webmin/changepass.pl /etc/webmin root correcthorsebatterystaple

will change roots password to correcthorsebatterystaple.

You can use locate changepass.pl to find where webmin is installed on your machine (the line above comes from the Webmin FAQ, but your installation could be under a different path, e.g. the debian path is /usr/share/webmin )

If you don't know who the webmin users are, you can see the users who exist in etc/webmin/miniconf.users, there should be at least a 'root' user there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .