Link to home
Start Free TrialLog in
Avatar of Alexandre Takacs
Alexandre TakacsFlag for Switzerland

asked on

Changing "root" password in Debian 9.1 when connected via key exchange

I'm having a small issue with a recently provisioned Debian 9.1 VM (from an online hosting company).

When deploying the VM I am provided with Key-Based Authentication for the machine. Those work fine (with the new "debian" super user, root not being anymore active by default) but I'd like to be able to use user / pass too (if nothing else for console access).

How do I set my password ? I tried
passwd debian

Open in new window

but I am prompted for the "old" password which I don't know...

Also - even if it is not best practice - can I activate the root user ?
Avatar of David Favor
David Favor
Flag of United States of America image

I'd personally switch hosting companies.

You'll require root for many activities.

Trying to create some other user, like debian + then attempting to assign all root privileges to user debian, seems overly complex + prone to error.

Since your hosting company is mucking about with root + debian, you'll have to open a ticket with them, asking for assistance.

Also, be great if you can post the name of this company, so people can avoid using them.
Avatar of Alexandre Takacs

ASKER

Well I did open a ticket with them and their response was that this was how debian was self installing and if I had any issue I had to raise them with debian...

I do believe that the latest debian builds are not activating the root user anymonre (as ubuntu does for quite some time).

The company in question is infomaniak
You'll have to ask them to reset the password for you to change, if you don't know it.  You can't change the password without it.  How do you get "super user" access with sudo if you don't have the password?


As for the Debian and Ubuntu password model:
You can always set the root password and "activate" root, but it's not really necessary.

root is already active and has to be active to use sudo.  Debian just followed Ubuntu's security model in limiting direct password access to root and limiting  This is better for Desktop users that are less technical, which is whom Ubuntu has been trying to court.  You can still put keys in root to access root directly or sudo into root.

Redhat variants are still following the old Unix model and giving you root as the default initial user.  This is the original server model that Redhat is still serving.

It's all the same basic linux underneath with variants in some utilities and GUI.
ASKER CERTIFIED SOLUTION
Avatar of Alexandre Takacs
Alexandre Takacs
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
self solved ...