Answer the question
In order to leave comments, you need to log in
How to create a new user in Debian?
Hello everyone.
I'm new to Linux. I decided to build a small server on VPS hosting. The server took everything, started it, gave the root password, but there is no usual USER. How can I create it so that I can safely disable Root via ssh and be able to connect and execute the usual commands with a simple USER, and leave everything else (Installing packages, executing scripts) to Root.
Google suggested this method to me , but even there is a lot of superfluous there.
Tell me good people.
Thanks in advance
Answer the question
In order to leave comments, you need to log in
[debian]
adduser --home /var/www --shell /bin/false --ingroup ftp USERNAME
adduser [options] [--home DIR] [--shell SHELL] [--no-create-home]
[--uid ID] [--firstuid ID] [--lastuid ID] [--ingroup GROUP | --gid ID]
[--disabled-password] [--disabled-login] [--gecos GECOS]
[--add_extra_groups] user
useradd -m -s /bin/bash -p PASSWORD USER_NAME
Next, from your machine ssh-copy-id [email protected] (copy the keys for authorization by them, you can first do it with ssh-keygen)
and then open /etc/ssh/ sshd_config and PermitRootLogin set to no.
Then we go via ssh as a regular user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question