User password

Hello. I am creating a new user using the command “sudo -H useradd --shell /bin/bash --system
----home-dir “/usr/local/user_name”
–comment ‘’
username”
I can’t use it after that. It asks me for the administrator password. I did not set a password when creating a user, but when using “sudo”, the user still asks me for a password. I tried to press enter, I tried to enter the password from this existing user, but everything is not correct. How do I find out which password is set automatically when creating a user?

You don’t need to use -H in this scenario.

What do you mean?

What asks you for the administrator password?

Why would you need a password for a system account?

In general, it would be helpful if you could explain more about what you are trying to accomplish.

I need to find out the password for the account I created. When I enter commands from under “sudo” in a new account, I am asked for a password. I didn’t set any password when creating the account

Accounts are created without a password. You need to set one after creation.

However, are you sure you are doing the right thing here? You created a system account which usually isn’t something that needs a password since you don’t login to system accounts.

Can you explain what the purpose of the user account is?

I want to try to install searxng.At a certain stage, I start being asked for a new user’s password, but I do not know it. The account is simply created and there is no suggestion to create a password for it anywhere

He is following this tutorial: https://docs.searxng.org/admin/installation-searxng.html#installation-basic

That tutorial doesn’t look like it needs a password for the account.

At which point are you being asked for a password?

It’s probably the sudo/root password… :thinking:

$ sudo -H sed -i -e “s/ultrasecretkey/$(openssl rand -hex 16)/g”
“/etc/searxng/settings.yml”

That wants your user password. Not the password for the newly created account.

He doesn’t fit

We believe that your system administrator has explained the basics
of security to you. As a rule, it all comes down to the following three rules:

No. 1) Respect the privacy of others.
No. 2) Think before you enter something.
№3) With great power comes great responsibility.

For security reasons, the password you enter will not be visible.

[sudo] password for searxng:

So you don’t know your sudo password?

Can you copy/paste the actual command you ran from your terminal?

Yes. I do not know the password for the account I just created. The user’s password does not match

sudo -H useradd --shell /bin/bash --system
–home-dir “/usr/local/searxng”
–comment ‘Privacy-respecting metasearch engine’
searxng

and 2 comands separately sudo -H mkdir “/usr/local/searxng” and sudo -H chown -R “searxng:searxng” “/usr/local/searxng”

I want you copy/paste the entire terminal output including the prompts the input the output. Everything.

Something is wrong in what you are doing if you are getting asked for that password.

[authority@authority-b450mds3h ~]$ sudo -H useradd --shell /bin/bash --system
–home-dir “/usr/local/searxng”
–comment ‘Privacy-respecting metasearch engine’
searxng
[authority@authority-b450mds3h ~]$ sudo -H mkdir “/usr/local/searxng”
[authority@authority-b450mds3h ~]$ sudo -H chown -R “searxng:searxng” “/usr/local/searxng”

There are no errors there

There are no mistakes. The problems start at the point “To install SEARXNG’s dependencies, exit the SearXNG bash session you opened above and start a new one. Before installing, check if your virtualenv was sourced from the login (~/.profile):”. I enter ~/.profile and get an error that I don’t have enough permissions