[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: password



On Sun 03 Apr 2022 at 21:25:45 (-0400), Noah Sombrero wrote:
> On Mon, 04 Apr 2022 03:10:01 +0200, Greg Wooledge <greg@wooledge.org>
> wrote:
> 
> >On Sun, Apr 03, 2022 at 07:56:56PM -0400, Noah Sombrero wrote:
> >> I understand that debian 11 does not establish a root password during
> >> installation, regardless of what the installer says.
> >
> >This is not correct.
> 
> So much for online help.

I've never installed any version of Debian without a root password
over a period of 25 years, ie since buzz. I type it here:

   ┌──────────────────┤ [!!] Set up users and passwords ├──────────────────┐    
   │                                                                       │    
   │ You need to set a password for 'root', the system administrative      │    
   │ account. A malicious or unqualified user with root access can have    │    
   │ disastrous results, so you should take care to choose a root password │    
   │ that is not easy to guess. It should not be a word found in           │    
   │ dictionaries, or a word that could be easily associated with you.     │    
   │                                                                       │    
   │ A good password will contain a mixture of letters, numbers and        │    
   │ punctuation and should be changed at regular intervals.               │    
   │                                                                       │    
   │ The root user should not have an empty password. If you leave this    │    
   │ empty, the root account will be disabled and the system's initial     │    
   │ user account will be given the power to become root using the "sudo"  │    
   │ command.                                                              │    
   │                                                                       │    
   │ Note that you will not be able to see the password as you type it.    │    
   │                                                                       │    
   │ Root password:                                                        │    
   │                                                                       │    
   │ _____________________________________________________________________ │    
   │                                                                       │    
   │ [ ] Show Password in Clear                                            │    
   │                                                                       │    
   │     <Go Back>                                          <Continue>     │    
   │                                                                       │    
   └───────────────────────────────────────────────────────────────────────┘    
                                                                                
     ┌────────────────┤ [!!] Set up users and passwords ├─────────────────┐     
     │                                                                    │     
     │ Please enter the same root password again to verify that you have  │     
     │ typed it correctly.                                                │     
     │                                                                    │     
     │ Re-enter password to verify:                                       │     
     │                                                                    │     
     │ __________________________________________________________________ │     
     │                                                                    │     
     │ [ ] Show Password in Clear                                         │     
     │                                                                    │     
     │     <Go Back>                                       <Continue>     │     
     │                                                                    │     
     └────────────────────────────────────────────────────────────────────┘     

and from then on, it just works.

You don't describe any symptoms of "not establishing a root password".

> >> To get a root
> >> password, I need to add
> >> rw init=/bin/bash
> >> to the grub start up script or
> >> ro init=/bin/bash
> >> to end of the kernel line
> >
> >That's not correct either.
> 
> This process described above must be given in a dozen places online.

That looks like a badly transcribed version of the first part of
one of the ways people recover from losing their root password,
or equivalent (like screwing up sudo). But it's also badly dated.
(I don't know what a "Grub start up script" is.)

You might have more luck if you:

. have an unencrypted rootfs,
. replace   ro   with   rw   in the kernel line,
. append   init=/bin/sh   rather than   init=/bin/bash
. type very carefully (no line editing, no completion),
. set a very simple password (that you can change later on).

[ … ]

> >1) The root account has a password, and you can use this to login directly
> >   as root ON A TEXT CONSOLE (not necessarily in a GUI), or to switch to
> >   root with the su command.
> 
> I have installed this debian many times in trying to fix video
> problems.  Not once has an entered password worked.

Without some evidence, the reasons for your difficulties will
remain undiagnosed. I'm certainly not going to try to guess.

> >2) Your initial user account -- the one you set up during installation --
> >   will be able to ascend to root privileges with the sudo command.
> 
> Does not work for  me.
> 
> >In the second case, if you wish to give root a usable password, all you
> >have to do is run:
> >
> >sudo passwd root
> 
> I get "user is not in the sudoers file.  This incident will be
> reported."

That figures. Obviously you don't fall into the second case,
but the first. There are simple ways to make case one fail.
For example, if you configure an inappropriate type of
keyboard and then reboot, all your password attempts will be
mistranslated and fail; you might be able to construct a
translation table by using the username field as a testbed,
then again you might not.

> Getting entered in the sudoers file seems to require
> having a root password already.

Obviously it does if you try to do it later, otherwise any
old user could just put themselves into the file. But if
you don't set a password during installation, the sudoers
entry is added for you, by the installer at that time.

Cheers,
David.


Reply to: