Perché alcuni utenti del sistema hanno / usr / bin / false come loro shell?

Sommario:

Perché alcuni utenti del sistema hanno / usr / bin / false come loro shell?
Perché alcuni utenti del sistema hanno / usr / bin / false come loro shell?

Video: Perché alcuni utenti del sistema hanno / usr / bin / false come loro shell?

Video: Perché alcuni utenti del sistema hanno / usr / bin / false come loro shell?
Video: ⚙💕SMONTO IL TUNNEL DELLA MIA FIAT 500 !!! 💕⚙pt.1 - YouTube 2024, Aprile
Anonim
Quando inizi a scavare in un sistema Linux, potresti trovare alcune cose confuse o inaspettate, come / usr / bin / false, per esempio. Perché è lì e qual è il suo scopo? Il post di Q & A di SuperUser di oggi ha la risposta alle domande di un lettore curioso.
Quando inizi a scavare in un sistema Linux, potresti trovare alcune cose confuse o inaspettate, come / usr / bin / false, per esempio. Perché è lì e qual è il suo scopo? Il post di Q & A di SuperUser di oggi ha la risposta alle domande di un lettore curioso.

La sessione di domande e risposte di oggi ci viene fornita per gentile concessione di SuperUser, una suddivisione di Stack Exchange, un raggruppamento di domande e risposte basato sulla comunità.

La domanda

Il lettore SuperUser user7326333 vuole sapere perché alcuni utenti del sistema hanno / usr / bin / false come loro shell:

Why do some system users have /usr/bin/false as their shell? What does that mean?

Perché alcuni utenti del sistema hanno / usr / bin / false come loro shell?

La risposta

Collaboratori SuperUser duDE, Toby Speight e bbaassssiiee hanno la risposta per noi. Per prima cosa, duDE:

This helps to prevent users from logging onto a system. Sometimes you need a user account for a specific task. Nevertheless, no one should be able to interact with this account on the computer. These are, on one hand, system user accounts. On the other hand, this is an account for which FTP or POP3 access is possible, but just no direct shell login.

If you look more closely at the /etc/passwd file, you will find the /bin/false command as a login shell for many system accounts. Actually, false is not a shell, but a command that does nothing and then also ends with a status code that signals an error. The result is simple. The user logs in and immediately sees the login prompt again.

Seguito dalla risposta di Toby Speight:

These users exist to be the owner of specific files or processes and are not intended to be login accounts. If the value of the “shell” field is not listed in /etc/shells, then programs such as FTP daemons do not allow access. Additionally, for programs that do not check /etc/shells, they make use of the fact that /bin/false will immediately return and deny an interactive shell.

E la nostra risposta finale da bbaassssiiee:

Some users have /usr/bin/false, others have /sbin/nologin, or they may even have /usr/bin/passwd. They can either be system users that are needed to isolate program permissions or human users of programs that use the password files for authentication.

Hai qualcosa da aggiungere alla spiegazione? Audio disattivato nei commenti. Vuoi leggere più risposte dagli altri utenti di Stack Exchange esperti di tecnologia? Controlla la discussione completa qui.

Immagine di credito: OpenStack Docs (OpenStack Project)

Consigliato: