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

Re: password



On Mon, 04 Apr 2022 05:30:01 +0200, David Wright
<deblis@lionunicorn.co.uk> wrote:

>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".

True, because I do establish one during installation.

>> >> 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,

Yes, that is what it is.

>or equivalent (like screwing up sudo). But it's also badly dated.
>(I don't know what a "Grub start up script" is.)

When starting debian, you are first presented with the grub partition
selector.  Press space to stop it continuing automatically.  Then
press e.  This takes you to the editing the startup script where you
can enter rw init=/bin/bash.  Who knows, this might be new with 11.3.

>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.

Does not work.

>> 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.

Thanks for not guessing.

I have finished reinstalling debian.  I did take care to make sure
that I have not disabled access to root during installation.  And I
did enter passwords.  The situation is as before:  no access to root,
no way to establish a password.

I started it in system restore mode.  It was suggested by another
person here that this would take me to root.  It does not.  It takes
me to my default user account with no elevated privileges.

>> >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.

That has always been my beef with linux.  It is optimized for the
multi-user environment.  Getting it to behave itself in a single-user
environment is a pain.  Specifically:  don't protect me from myself,
and realize that I am the administrator.  It is true that I might
horribly mess things up, in which case, I agree to reinstall linux and
learn something.

>Cheers,
>David.
-- 
Noah Sombrero


Reply to: