Announcement

Collapse
No announcement yet.

Unable to SU to Root on Ubuntu Server 18.04LTS

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unable to SU to Root on Ubuntu Server 18.04LTS

    Strange. I can sudo all day, but when I su root and enter my password, I get back: su: Authentication failure

    What am I doing wrong and how can I fix it? I would like to su so I can setup OpenVPN on my server and my Kubuntu 14.04LTS computer as a client.
    "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

    #2
    Er... I'd expect that su or su root would ask for root's password, which is not normally set in Ubuntu.

    Can you use sudo -i?
    Regards, John Little

    Comment


      #3
      My go to (which may be the wrong way) -
      Code:
      sudo su
      ~EVE Online - the best game I will never recommend you play~

      Comment


        #4
        Yep, sudo su worked. Thank you.
        "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

        Comment


          #5
          Originally posted by nlsthzn View Post
          My go to (which may be the wrong way) -
          Code:
          sudo su
          It's not "wrong" per se, but "sudo -i" is technically better (see here for a short description: https://help.ubuntu.com/community/Ro...udo_and_shells)

          Alternatively, one could use "sudo su -" or "sudo su -l" to get a login shell, but "sudo -i" avoids unnecessary chaining.

          Comment


            #6
            The answer to the original question is - because Ubuntu and flavors do not install with a root password. "su" requires that the user you're attempting to switch to has a password. "sudo" uses YOUR password to elevate you to root privilege.

            Ubuntu's don't have a root password because it's considered unnecessary and unsafe.

            However, it's your install so you can make it as unsafe as you like. "sudo passwd root" will create a root password and then you can (unsafely) log in as root.

            Please Read Me

            Comment


              #7
              Excellent explaination oshunluvr. Thank you.
              "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

              Comment

              Working...
              X