Results 1 to 5 of 5

Thread: I Need a Password

  1. #1
    Join Date
    Jun 2016
    Beans
    13

    I Need a Password

    I intentionally set-up Xenial Xeru not to need a password. But I am learning Bash, and I need a password to use sudo. I have already tried pressing Enter, and tried using my Windows password, with no success. How can I add a password?

  2. #2
    Join Date
    Jul 2016
    Beans
    4

    Re: I Need a Password

    The traditional method to set a password is this command:
    sudo passwd [user]
    Where [user] is replaced with your username.
    It should let you set a password without prompting for one since none currently exists.


    If that doesn't work, you could type this:
    su
    OR
    su root
    THEN
    passwd [user]

    "su" is "switch user", which assumes root when no username is provided.
    If you didn't set a root user password during install, it won't ask for one. If you did, then...hmm...I would have to research an alternative method for you.

  3. #3
    Join Date
    Jun 2016
    Beans
    13

    Re: I Need a Password

    Patrick, it worked great. Thank you.

  4. #4
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: I Need a Password

    Perhaps you should tell us precisely how you installed your OS. To my knowledge, it is impossible to install without a password. Unless things have changed in Xenial, the system will not proceed with the install on a blank password. Therefore, your reference to having a blank password does not make sense to me, unless you are actually referring to the root account which is disabled by default in all flavours of 'buntu. This disabling is done for good reason, since new users run into all sorts of serious problems when they enable it.

    I suspect that you may have enabled the root account through your actions and are running as root for normal use. This would be not only a huge security risk but a surefire way to mess up your user account when you actually change to running under it.

  5. #5
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: I Need a Password

    I have not noticed any change in the installation procedures of Xenial Xerus (16.04) in comparison with earlier versions or the development version of 16.10.

    We prefix commands that require administrator privileges with sudo to force a prompt for a user password. If we are working in the terminal as root then we do not need to use the word sudo. I am not recommending that we do anything to enable the root account. I am just stating a fact about our use of sudo as a prefix to a command.

    Regards.
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


Tags for this Thread

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
  •