I need help with passwords

I’m new here, I don’t know how to set sudo and root password
Also console won’t let me type anything when it wants a password

Welcome to the community @Dettani :waving_hand::partying_face: :enos_flag:

If you’re logged in with an account that is member of the sudo group, then the sudo password will be that accounts password.

For example, if you log in with the account dettani and that account is a member of sudo, then use dettani’s password when using sudo and prompted.

To change the root password, the methods that come to mind are:

sudo passwd root

You could probably also log-in as root and change it that way. To log in as root (be careful when doing this, you shouldn’t typically need to do this!):

sudo -i

Then:

passwd
1 Like

Welcome to the forum :enos_flag: :enos:

When you are in the console and typing a password it might look like you can not type anything, but for safety reasons the password will not be visible.

2 Likes

Go to a terminal/console and type in the command id. That will list your user id (i.e. uid) and the groups that you belong to. Your user id ought to be 1000 or higher. If the uid is 0 (i.e. zero) then you are logged in as root and you can change password by giving the passwd command.

If your user id is 1000 or higher then you will have to login as root to change the root password. For that give the command su - enter the existing root password and proceed forward. After you do this, you can change the password for the root by using the command passwd . Once you have done this, enter the command exit to return back to your user id shell.

sudo password is your id password. So if you change your user id password it will change the sudo password too. That does not mean it will change root password. For that you will have to follow the steps given in the second paragraph above.

In the console/terminal when you use the command passwd to change the password it will not show asterix (i.e. * character) for every password character you type. That is a security feature. Just type the new password out, press enter. You will be asked to confirm the password. Do that, i.e. retype the new password once more. Again you will not be shown the characters as you type, i.e. no asterix (i.e. * character) will be displayed for every keypress.
Do not try to paste the password from a text file. Do not use CTRL+SHIFT+V or CTRL+V or anything like that while entering new password.

If you still face issues, take a screenshot and outline the steps that you have taken to change the password in this thread. You can remove the actual value of the new password that you are trying to change.

1 Like

Thank you for the help :heart: Have a great Day!

1 Like