R
R
rullers2015-08-21 18:24:10
ubuntu
rullers, 2015-08-21 18:24:10

Prevent root from entering PuTTY console?

Ubuntu server 14.04.3 x64, then set
// icecast, ezstream, libssh2 and pecl ssh2, curl and gd, RadioCMS//
with difficulty, but everything got up, and the server radio worked.
Problems:
1 - RadioCMS did not start, did not accept the password and user.
2 - in the sshd_config file, I canceled the ability to log in as root and saved it. That's it... the dancing is over. I can’t log in under rootom, there is a user, but without rights, I try to add rights to him - figs, I can’t log into the console under root, via FTP - the user has no rights and does not save the edited file. And FTP root is no longer included. I tried to roll back but the short rollback time did not save. Guys what to do then? a? to take down the server and anew?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
rullers, 2015-08-21
@rullers

1. adduser: Only root may add a user or group to the system.
adduser: Only the root user can add a user or group to the system.
2. sudo adduser wollk2 sudo
wollk2 is not in the sudoers file. This incident will be reported.
And read and tried - by. Just tell me on your fingers how it’s really not for the super user to save the sshd_config file after editing

V
Vasily Pechersky, 2015-08-22
@Vasily_Pechersky

By default in Ubuntu, root is LOCKED.
As a recommendation, use sudo su.
The instructions say: sudo passwd -u root (Unlocks the user and sets a password). After that, the su command will work.
Next - PermitRootLogin yes in your sshd_config.
Only I don't understand why you need root ssh login ? I set up dozens of servers using sudo su.........

K
Kir Marchenko, 2015-08-21
@kir64

What means "the user is, but without the rights"?
In Ubuntu, ssh login is done by the user that was created when the system was installed. Further execution of the program with elevated rights is possible through sudo, or you can get into the root shell with the sudo -s command (but it's better not to do this).
You can and should read more about editing configuration files and users in general here: http://help.ubuntu.ru/manual/users_and_groups )

P
Puma Thailand, 2015-08-21
@opium

For almost all DCs, you can boot into the rescue mode from the control panel and mount the file there and change the ssh config
Del for a minute

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question