Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Lubuntu - root password at install time?

Hybrid View

  1. #1
    Join Date
    Jul 2021
    Beans
    17

    Lubuntu - root password at install time?

    like the title says.

    I've just installed Lubuntu and am trying to set up Samba and Apache. I'm fed up of typing "sudo" befor every command, so would like to switch to being root. I assumed no password at install time but this does not work. I tried my username password and "password" - those don't work either. Can anyone enlighten me, please?
    Last edited by fausto99; September 14th, 2021 at 02:41 PM.

  2. #2
    Join Date
    Apr 2014
    Location
    Tucson AZ, USA
    Beans
    1,057
    Distro
    Ubuntu

    Re: Lubuntu - root password at install time?

    I'm not sure if there is a policy on this for the forum but you just set one.

    Code:
    sudo -i
    Then once under root...

    Code:
    passwd
    Add your password. Doesn't follow the recommended way of things for *buntu but such is life. Be careful once this is done. It's all to easy to trash your system.

    *EDIT*

    I think you can one shot it like this. Haven't tried.
    Code:
    sudo passwd root
    Last edited by Tadaen_Sylvermane; September 14th, 2021 at 02:52 PM.

  3. #3
    Join Date
    Oct 2018
    Beans
    178

    Re: Lubuntu - root password at install time?

    This is really not a good idea. Using sudo for commands makes you give extra thought to what you are doing, to reduce any catastrophic mistakes. However, if you insist as running as root, use extreme caution, and when you launch your terminal, use code sudo -i, enter your password, and you will not need sudo from then until you exit the terminal. REMEMBER...USE WITH EXTREME CAUTION;; YOUR ENTIRE SYSTEM CAN BE KILLED WITH A SIMPLE TYPO!! If I were you, I would reconsider doing this.
    I'm a firm believer that the only stupid question is the one you don't ask.
    Lenovo ideapad320-15iap, 1.1G Intel processor with onboard graphics, x64, 1TB SSD, 8GB ram
    lubuntu 22.04.1, fully updated

  4. #4
    Join Date
    May 2010
    Beans
    3,246

    Re: Lubuntu - root password at install time?

    Code:
    sudo su -
    And you will become root. For security I suggest you leave the root account locked and unused, especially for a system with services like Samba and Apache.
    There is a grace period for sudo which means you don't type your password for every command. The grace does expire and you need to reenter your password again but you will be able to use sudo uninterrupted during the grace.

  5. #5
    Join Date
    Jul 2021
    Beans
    17

    Re: Lubuntu - root password at install time?

    I found a way of resetting the password entering recovery mode via GRUB. All sorted now. I come from a distant UNIX background and am reasonably aware of the dangers of doing everything as root.

    My main gripe with sudo was that, having use it to create a root owned directory, I couldn't then use "sudo cd" to go into the new directory! What sort of madness is that?

    Finally, no one answered the question; what is the root password set to by the installation process (at install time)?
    Last edited by fausto99; September 14th, 2021 at 05:26 PM.

  6. #6
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,821
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Lubuntu - root password at install time?

    Quote Originally Posted by fausto99 View Post
    My main gripe with sudo was that, having use it to create a root owned directory, I couldn't then use "sudo cd" to go into the new directory! What sort of madness is that?
    That's because cd is a shell built-in. sudo doesn't work with those. Instead, use a root shell, for example with sudo -i.

    Finally , no one answered the question; what is the root password set to by the installation process (at install time)?
    No password is set, so you can't login as root.

  7. #7
    Join Date
    Jul 2021
    Beans
    17

    Re: Lubuntu - root password at install time?

    Let's just check I've understood this...

    a) "sudo -i" gets me a different shell/cmd window where I am root?
    b) no password is set at install time, but you can't log in as root with a blank password?!

  8. #8
    Join Date
    May 2010
    Beans
    3,246

    Re: Lubuntu - root password at install time?

    Quote Originally Posted by fausto99 View Post
    Let's just check I've understood this...

    a) "sudo -i" gets me a different shell/cmd window where I am root?
    b) no password is set at install time, but you can't log in as root with a blank password?!
    a) If you read the man page for sudo by running
    Code:
    man sudo
    You will see what it does. You sound very new to the OS and I suggest you use it as is and stick to using sudo until you understand the OS a little more.

    b) If an account has no password set then how can you get the password right? Any input you give, even a blank one, will be incorrect as there is no password to compare to. This is by design and is a great security measure as the root account is common on ALL Linux systems so is targeted by attacks. If the account has no password and is locked (Which it is by default) then 100% of attempts to log in as root will fail.
    Last edited by ActionParsnip; September 14th, 2021 at 05:49 PM. Reason: 00% to 100%

  9. #9
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,821
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Lubuntu - root password at install time?

    I rarely use a root shell, but there's one case where you really need it. You can't cd into a directory where you have no execute permission.

    Further, if you have no read permission in the directory, autocompletion of filenames doesn't work, and sometimes it's nice to have shell I/O redirection.

  10. #10
    Join Date
    May 2010
    Beans
    3,246

    Re: Lubuntu - root password at install time?

    The root password is not set at any time. The account is disabled by default and no password is set.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •