D
D
Dmitry Lebedev2012-08-16 19:16:42
Debian
Dmitry Lebedev, 2012-08-16 19:16:42

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

5 answer(s)
S
Sergey, 2012-08-16
@Ualde

man adduser

A
Artem Negri, 2012-12-27
@artemn

[debian]

adduser --home /var/www --shell /bin/false --ingroup ftp USERNAME

--home /var/www - set the home directory
--shell /bin/false - if you disable bash execution
--ingroup ftp - place the user in the
etc group.
but in general
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

IMHO, clearly describes.

D
dgeliko, 2012-08-16
@dgeliko

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.

A
Andrey Shiryaev, 2012-08-16
@Claud

adduser or useradd commands.

L
Lev Lybin, 2012-08-16
@lybin

under root:
adduser
then the utility will ask you questions, the first is the user name, login, then you can simply enter enter, and the last enter the password for the user twice, the last enter and you're done, everything is simple.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question