Tänane küsimuste ja vastuste seanss jõuab meile viisakalt SuperUserini - Stack Exchange'i ja kogukonnapõhiste Q & A veebisaitide rühmitusse.
Küsimus
SuperUseri lugeja ge0rg soovib teada, kas PermitRootLogin põhineb UID-il või kasutajanimes:
The man page states that PermitRootLogin:
Specifies whether root can log in using ssh(1).
However, it is not clear if this check is based on the user name (root) or the UID (0). What happens if the root account is renamed to admin? Will admin be able to log in when PermitRootLogin=no? What happens if there are two accounts with UID=0 (i.e. root and admin)? Will either of them be able to log in?
Kas PermitRootLogin põhineb UID-il või kasutajanimes?
Vastus
SuperUseri toetajale mtak on meie jaoks vastus:
It seems the check is done with the UID (tested on OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016):
Set PermitRootLogin to Off:
Make sure a user named admin is created with UID 0:
If we set PermitRootLogin back to On:
Kas teil on seletamiseks midagi lisada? Helistage kommentaarides. Kas soovite lugeda rohkem vastuseid teistelt tech-savvy Stack Exchange'i kasutajatelt? Tutvu täieliku arutelu teemaga siit.
Image Credit: Linuxi ekraanipildid / Xmodulo (Flickr / Xmodulo)