Kāpēc daži sistēmas lietotāji ir / usr / bin / false kā viņa apvalks?

Satura rādītājs:

Kāpēc daži sistēmas lietotāji ir / usr / bin / false kā viņa apvalks?
Kāpēc daži sistēmas lietotāji ir / usr / bin / false kā viņa apvalks?

Video: Kāpēc daži sistēmas lietotāji ir / usr / bin / false kā viņa apvalks?

Video: Kāpēc daži sistēmas lietotāji ir / usr / bin / false kā viņa apvalks?
Video: Is Your Computer Crashing? Find Out Why in 5 min. - YouTube 2024, Aprīlis
Anonim
Kad jūs sākat rakšana uz Linux sistēmu, jūs varat atrast dažas neskaidras vai negaidītas lietas, piemēram, / usr / bin / false. Kāpēc tas ir un kāds ir tā mērķis? Šodienas SuperUser Q & A ziņai ir atbilde uz ziņkāršiem lasītāja jautājumiem.
Kad jūs sākat rakšana uz Linux sistēmu, jūs varat atrast dažas neskaidras vai negaidītas lietas, piemēram, / usr / bin / false. Kāpēc tas ir un kāds ir tā mērķis? Šodienas SuperUser Q & A ziņai ir atbilde uz ziņkāršiem lasītāja jautājumiem.

Šodienas jautājumu un atbilžu sesija mums priecājas par SuperUser - Stack Exchange dalību, kas ir kopienas vadīta Q & A tīmekļa vietņu grupa.

Jautājums

SuperUser lasītājs user7326333 vēlas uzzināt, kāpēc dažiem sistēmas lietotājiem to shell ir šāds / usr / bin / false:

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

Kāpēc dažiem sistēmas lietotājiem ir / usr / bin / false kā viņu apvalks?

Atbilde

SuperUser atbalstītāji duDE, Toby Speight un bbaassssiiee mums atbild. Pirmkārt, 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.

Seko Toby Speight atbilde:

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.

Un mūsu galīgā atbilde no 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.

Vai kaut ko pievienot paskaidrojumam? Skatieties komentāros. Vēlaties lasīt citas atbildes no citiem tehnoloģiju savvy Stack Exchange lietotājiem? Šeit skatiet pilnu diskusiju pavedienu.

Attēlu kredīts: OpenStack dokumenti (OpenStack projekts)

Ieteicams: