samoshi
By:
samoshi

what's the root password in FreeBsd? no possibility to reset it

April 20, 2017 711 views
Miscellaneous FreeBSD

I've installed a fresh FreeBsd droplet. I don't know a password for root and haven't received it, neither in spam. Moreover, in the dashboard at Digital Ocean it says "you should manager your password inside your system/droplet via ssh, by yourself. We don't have and can't reset it"

2 Answers

@samoshi

When I attempt to setup a new FreeBSD Droplet, it's telling me that I need to use SSH Keys

That means no password will be setup for root, instead, your SSH Key will be used to login and you would provide that when connecting to the server.

For example, on MacOS, using Terminal, I'd run:

ssh root@droplet_ip -i /path/to/private_key

With PuTTy on Windows/Linux, you'll need to convert the key to PuTTy format and set the path to the key by modifying the entry in PuTTy -- I believe it's under Auth.

  • That doesn't mean there'll be no password for root. And my question isn't about connecting via ssh.

    • @samoshi

      If you deploy with SSH Keys (as is required by the FreeBSD image), DigitalOcean doesn't set or e-mail a root password for the root user. You're expected to login using the SSH Key and from there, create a sudo user as well as any other users that you may need for your particular use-case.

      Not setting/sending a root password is standard when it comes to deploying with SSH Keys at DigitalOcean. When deploying with SSH Keys, the root user isn't setup with a password as password authentication is disabled.

      The comment on how to login was since you referenced the dashboard.

      • Where did I mention login or ssh? I've logged in. I asked about the password. How am I supposed to run "su - something" or just "su" without the password of root?

        • @samoshi

          Check the link that @hansen provided for details on how to set the password for root.

          That said, to be fair, you didn't not mention it. Since this is the community and we don't have physical access to your Droplet, the best advice towards a solution that we can give you is based on the initial post and subsequent answers that we get from you.

          We all try to help, myself included, though the question asked was specific about where the root password was -- my answer was that when you deploy with SSH keys, there's not one, and that holds true, even in the guide that @hansen links to.

          I can understand how you'd see that there's no relation, though with DigitalOcean there is. Whether it's FreeBSD, CentOS, Ubuntu, or Debian, if you deploy with SSH Keys, no password is set for root. You can login with your SSH Key and set one if you'd like, though by default, one is not set.

          The reason for this is directly related to the fact that you're using an SSH Key and when that's the case, password authentication is turned off and login is only allowed by SSH Key until you configure it otherwise.

          Not all providers do this, so again, I can see where there would be some confusion -- just trying to help either way :-).

        • Ocean freebsd droplet doesn't come with setup that prompts you with password change first thing you boot up. Instead, it identifies with your public id and authenticates with your private keys.

          If you have a private key in your box and have that copied to your DO settings

          Run this command

          ssh-add

          And do

          ssh freebsd@droplet_ip

          Hope you are good to go! I ran into same problem and it worked for me!

There is no root password set by default. You can set a password for root with:

sudo passwd

https://www.digitalocean.com/community/tutorials/how-to-get-started-with-freebsd-10-1#set-a-root-password-(optional)

FreeBSD is a secure, high performance operating system that is suitable for a variety of server roles. In this guide, we will cover some basic information about how to get started with a FreeBSD server. The first step you need to take to...
Have another answer? Share your knowledge.