Miksi jotkut järjestelmän käyttäjät ovat / usr / bin / false niiden Shell?

Sisällysluettelo:

Miksi jotkut järjestelmän käyttäjät ovat / usr / bin / false niiden Shell?
Miksi jotkut järjestelmän käyttäjät ovat / usr / bin / false niiden Shell?

Video: Miksi jotkut järjestelmän käyttäjät ovat / usr / bin / false niiden Shell?

Video: Miksi jotkut järjestelmän käyttäjät ovat / usr / bin / false niiden Shell?
Video: J. Krishnamurti - Ojai 1985 - Public Talk 4 - The ending of continuity - YouTube 2024, Huhtikuu
Anonim
Kun aloitat kaivamisen Linux-järjestelmään, saatat löytää joitakin hämmentäviä tai odottamattomia asioita, kuten esimerkiksi / usr / bin / false. Miksi se on olemassa ja mikä on sen tarkoitus? Tänään SuperUser Q & A -postilla on vastaus utelias lukijan kysymyksiin.
Kun aloitat kaivamisen Linux-järjestelmään, saatat löytää joitakin hämmentäviä tai odottamattomia asioita, kuten esimerkiksi / usr / bin / false. Miksi se on olemassa ja mikä on sen tarkoitus? Tänään SuperUser Q & A -postilla on vastaus utelias lukijan kysymyksiin.

Tämän päivän kysymys- ja vastausistunto tulee meihin SuperUserin hyväksi - Stack Exchangein alaosasto, joka on yhteisöllinen Q & A-sivustojen ryhmittely.

Kysymys

SuperUser-lukija user7326333 haluaa tietää, miksi jotkin järjestelmän käyttäjät ovat / usr / bin / false niiden shell:

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

Miksi jotkin järjestelmän käyttäjät ovat / usr / bin / false kuorinaan?

Vastaus

Vastauksemme ovat meille SuperUser-avustajat duDE, Toby Speight ja bbaassssiiee. Ensin ylös,

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.

Seuraa Toby Speightin vastausta:

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.

Ja meidän lopullinen vastaus 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.

Onko jokin asia lisättävä selitykseen? Kuulkaa kommentit. Haluatko lukea lisää vastauksia muilta tech-tajuilta Stack Exchange-käyttäjiltä? Katso koko keskusteluketju täältä.

Image Credit: OpenStack-dokumentit (OpenStack Project)

Suositeltava: